What is the difference between == and equals() in Java?

Question: I wanted to clarify if I understand this correctly:

== is a reference comparison, i.e. both objects point to the same memory location
.equals() evaluates to the comparison of values in the objects
Comment: yeah, pretty much
Comment: A sentence like "both objects point to the same memory location" is sloppy language, which can make understanding more difficult. You mean: "both variables refer to the same object". Note that a variable is not an object; a variable is a *reference* to an object. Objects don't "point to" anything.
Comment: Yes, spot on. You can think of `.equals()` as *meaningfully equivalent*
Comment: In C# (and many other languages) the *equality operator* ( **==** ) corresponds to the `Object.Equals()` method. Descendants classes, like `String`, can define what it means for two strings to be **==** by overriding the `.Equals` method. Java cannot do that. The Java `String` class (and no class in Java) has a way to override **==** to make it behave the way it should behave. This means you **must** call `.equals()` yourself manually.
Comment: Possible duplicate of [How do I compare strings in Java?](http://stackoverflow.com/questions/513832/how-do-i-compare-strings-in-java)
Comment: "==" is for Primitive Types and ".equals()" is to compare Reference types(If "==" is used on reference types, the hash code is compared by default)
Answer: In general, the answer to  your question is "yes", but...

.equals(...) will only compare what it is written to compare, no more, no less.
If a class does not override the equals method, then it defaults to the equals(Object o) method of the closest parent class that has overridden this method.
If no parent classes have provided an override, then it defaults to the method from the ultimate parent class, Object, and so you're left with the Object#equals(Object o) method. Per the Object API this is the same as ==; that is, it returns true if and only if both variables refer to the same object, if their references are one and the same. Thus you will be testing  for object equality and not functional equality.
Always remember to override hashCode if you override equals so as not to "break the contract". As per the API, the result returned from the hashCode() method for two objects must be the same if their equals methods show that they are equivalent. The converse is not necessarily true.
Comment: @JSK print the values of d1 and d2 and I think you'll see why you're returning false.
Comment: @BoDidely I figured it out. It was because all the wrapper classes are immutable.
Comment: if `==` checks for memory reference then why am I getting this strange behavior in [this][1][1]: https://docs.google.com/document/d/1ducE-yZEDyyjoKUTkTEsw3sdSw740d0Z5iiJz3IzABE/edit?usp=sharing       I expected output to be true. can clear my confusions
Comment: `The equals method for class Object implements the most discriminating possible equivalence relation on objects; that is, for any non-null reference values x and y, this method returns true if and only if x and y refer to the same object (x == y has the value true).`

`Note that it is generally necessary to override the hashCode method whenever this method is overridden, so as to maintain the general contract for the hashCode method, which states that equal objects must have equal hash codes.`
(https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html#equals(java.lang.Object))
Answer: With respect to the String class:
The equals() method compares the "value" inside String instances (on the heap) irrespective if the two object references refer to the same String instance or not. If any two object references of type String refer to the same String instance then great! If the two object references refer to two different String instances .. it doesn't make a difference. Its the "value" (that is: the contents of the character array) inside each String instance that is being compared.
On the other hand, the "==" operator compares the value of two object references to see whether they refer to the same String instance. If the value of both object references "refer to" the same String instance then the result of the boolean expression would be "true"..duh. If, on the other hand, the value of both object references "refer to" different String instances (even though both String instances have identical "values", that is, the contents of the character arrays of each String instance are the same) the result of the boolean expression would be "false".
As with any explanation, let it sink in.
I hope this clears things up a bit.
Comment: To add on to Tonio's comment. `String` build from string literal will be added to something called the `String constant pool`, e.g. `String s1 = "someString"; String s2 = "someString;"` both `s1` & `s2` will share the same reference.  `s1 == s2` will return true. But if they were constructed via the `String constructor`, e.g. `String s1 = new String("someString"); String s2 = new String("someString");` then they will not share the same reference. `s1 == s2` will return false.
Comment: (Thread necromancy, I know...) For `String`s, `==` is reference equals as well, yes, but it _usually_ works (as in two `String`s with the same content will _usually_ be `==` to each other), because of how Java handles `String`s.  It won't always, and it's certainly bad practice, but it's a common mistake, particularly from people coming from other languages.
Comment: so for strings == is reference equals aswell? ie works the same as for other objects?
Answer: There are some small differences depending whether you are talking about "primitives" or "Object Types"; the same can be said if you are talking about "static" or "non-static" members; you can also mix all the above...
Here is an example (you can run it):
public final class MyEqualityTest
{
    public static void main( String args[] )
    {
        String s1 = new String( "Test" );
        String s2 = new String( "Test" );

        System.out.println( "\n1 - PRIMITIVES ");
        System.out.println( s1 == s2 ); // false
        System.out.println( s1.equals( s2 )); // true

        A a1 = new A();
        A a2 = new A();

        System.out.println( "\n2 - OBJECT TYPES / STATIC VARIABLE" );
        System.out.println( a1 == a2 ); // false
        System.out.println( a1.s == a2.s ); // true
        System.out.println( a1.s.equals( a2.s ) ); // true

        B b1 = new B();
        B b2 = new B();

        System.out.println( "\n3 - OBJECT TYPES / NON-STATIC VARIABLE" );
        System.out.println( b1 == b2 ); // false
        System.out.println( b1.getS() == b2.getS() ); // false
        System.out.println( b1.getS().equals( b2.getS() ) ); // true
    }
}

final class A
{
    // static
    public static String s;
    A()
    {
        this.s = new String( "aTest" );
    }
}

final class B
{
    private String s;
    B()
    {
        this.s = new String( "aTest" );
    }

    public String getS()
    {
        return s;
    }

}

You can compare the explanations for "==" (Equality Operator) and ".equals(...)" (method in the java.lang.Object class) through these links:

==: http://docs.oracle.com/javase/tutorial/java/nutsandbolts/op2.html
.equals(...): http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html#equals(java.lang.Object)
Comment: Interesting example. Different perspective from the above answers. Thanks!
Comment: Best answer in my opinion, as it's clearer than the other full-text answers without losing the explanation (if you undertand class and static concepts, of course)
Answer: The difference between == and equals confused me for sometime until I decided to have a closer look at it.
Many of them say that for comparing string you should use equals and not ==. Hope in this answer I will be able to say the difference.
The best way to answer this question will be by asking a few questions to yourself. so let's start:
What is the output for the below program:
String mango = "mango";
String mango2 = "mango";
System.out.println(mango != mango2);
System.out.println(mango == mango2);

if you say,
false
true

I will say you are right but why did you say that?
and If you say the output is,
true
false

I will say you are wrong but I will still ask you, why you think that is right?
Ok, Let's try to answer this one:
What is the output for the below program:
String mango = "mango";
String mango3 = new String("mango");
System.out.println(mango != mango3);
System.out.println(mango == mango3);

Now If you say,
false
true

I will say you are wrong but why is it wrong now?
the correct output for this program is
true
false

Please compare the above program and try to think about it.
Ok. Now this might help (please read this : print the address of object - not possible but still we can use it.)
String mango = "mango";
String mango2 = "mango";
String mango3 = new String("mango");
System.out.println(mango != mango2);
System.out.println(mango == mango2);
System.out.println(mango3 != mango2);
System.out.println(mango3 == mango2);
// mango2 = "mang";
System.out.println(mango+" "+ mango2);
System.out.println(mango != mango2);
System.out.println(mango == mango2);

System.out.println(System.identityHashCode(mango));
System.out.println(System.identityHashCode(mango2));
System.out.println(System.identityHashCode(mango3));

can you just try to think about the output of the last three lines in the code above:
for me ideone printed this out (you can check the code here):
false
true
true
false
mango mango
false
true
17225372
17225372
5433634

Oh! Now you see the identityHashCode(mango) is equal to identityHashCode(mango2) But it is not equal to identityHashCode(mango3)
Even though all the string variables - mango, mango2 and mango3 - have the same value, which is "mango", identityHashCode() is still not the same for all.
Now try to uncomment this line // mango2 = "mang"; and run it again this time you will see all three identityHashCode() are different.
Hmm that is a helpful hint
we know that if hashcode(x)=N and hashcode(y)=N => x is equal to y
I am not sure how java works internally but I assume this is what happened when I said:
mango = "mango";

java created a string "mango" which was pointed(referenced) by the variable mango something like this
mango ----> "mango"

Now in the next line when I said:
mango2 = "mango";

It actually reused the same string "mango" which looks something like this
mango ----> "mango" <---- mango2

Both mango and mango2 pointing to the same reference
Now when I said
mango3 = new String("mango")

It actually created a completely new reference(string) for "mango". which looks something like this,
mango -----> "mango" <------ mango2

mango3 ------> "mango"

and that's why when I put out the values for mango == mango2, it put out true. and when I put out the value for mango3 == mango2, it put out false (even when the values were the same).
and when you uncommented the line // mango2 = "mang";
It actually created a string "mang" which turned our graph like this:
mango ---->"mango"
mango2 ----> "mang"
mango3 -----> "mango"

This is why the identityHashCode is not the same for all.
Hope this helps you guys.
Actually, I wanted to generate a test case where == fails and equals() pass.
Please feel free to comment and let me know If I am wrong.
Comment: wrong example to use String to clear doubts on == and equals, String when not used with new are put into String Pool and whenever same string is assigned to new reference it points to same string in pool. So probably use some custom object example for == and .equals() comparison.
Comment: Does the `mango == mango2` happen because you didn't create `mango2 `as a new String object, and instead just directly referenced `"mango"`?
Answer:
The == operator tests whether two variables have the same references
(aka pointer to a memory address).

String foo = new String("abc");
String bar = new String("abc");

if(foo==bar)
// False (objects are identical but not same)

bar = foo;

if(foo==bar)
// True (Now, objects are identical and same)

Whereas the equals() method tests whether two variables refer to objects
that have the same state (values).

String foo = new String("abc");
String bar = new String("abc");

if(foo.equals(bar))
// True (The objects are identical but not same)

Comment: Wrong.  if(foo==bar) this should be true not false. It will reused the same string "adc". Test it in a sandbox, it will return true for both.
Comment: Your answer is only valid for String objects and because String overrides equals to return true if the "represents the same sequence of characters".

https://docs.oracle.com/javase/7/docs/api/java/lang/String.html

For the general case of the original question, your answer is either wrong, misleading, or incorrect
Answer: You will have to override the equals function (along with others) to use this with custom classes.
The equals method compares the objects.
The == binary operator compares memory addresses.
Answer: == is an operator and equals() is a method.
Operators are generally used for primitive type comparisons and thus == is used for memory address comparison and equals() method is used for comparing objects.
Comment: Simple and easiest answer
Answer:  String w1 ="Sarat";
 String w2 ="Sarat";
 String w3 = new String("Sarat");

 System.out.println(w1.hashCode());   //3254818
 System.out.println(w2.hashCode());   //3254818
 System.out.println(w3.hashCode());   //3254818

 System.out.println(System.identityHashCode(w1)); //prints 705927765
 System.out.println(System.identityHashCode(w2)); //prints 705927765
 System.out.println(System.identityHashCode(w3)); //prints 366712642

 if(w1==w2)   //  (705927765==705927765)
 {
   System.out.println("true");
 }
 else
 {
   System.out.println("false");
 }
 //prints true

 if(w2==w3)   //  (705927765==366712642)
 {
   System.out.println("true");
 }
 else
 {
   System.out.println("false");
 }
 //prints false

 if(w2.equals(w3))   //  (Content of 705927765== Content of 366712642)
 {
   System.out.println("true");
 }
 else
 {
   System.out.println("false");
 }
 //prints true

Comment: Simple and best explanation
Answer: Both == and .equals() refers to the same object if you don't override .equals().
Its your wish  what you want to do once you override .equals(). You can compare the invoking object's state with the passed in object's state or you can just call super.equals()
Answer: Here is a general thumb of rule for the difference between relational operator == and the method .equals().
object1 == object2 compares if the objects referenced by object1 and object2 refer to the same memory location in Heap.
object1.equals(object2) compares the values of object1 and object2 regardless of where they are located in memory.
This can be demonstrated well using String
Scenario 1
 public class Conditionals {

    public static void main(String[] args) {
       String str1 = "Hello";
       String str2 = new String("Hello");
       System.out.println("is str1 == str2 ? " + (str1 == str2 ));
       System.out.println("is str1.equals(str2) ? " + (str1.equals(str2 )));
    }

 }

The result is
      is str1 == str2 ? false
      is str1.equals(str2) ? true

Scenario 2
public class Conditionals {

    public static void main(String[] args) {
       String str1 = "Hello";
       String str2 = "Hello";
       System.out.println("is str1 == str2 ? " + (str1 == str2 ));
       System.out.println("is str1.equals(str2) ? " + (str1.equals(str2 )));
    }

}

The result is
  is str1 == str2 ? true
  is str1.equals(str2) ? true

This string comparison could be used as a basis for comparing other types of object.
For instance if I have a Person class, I need to define the criteria base on which I will compare  two persons. Let's say this person class has instance variables of height and weight.
So creating person objects person1 and person2 and for comparing these two using the .equals() I need to override the equals method of the person class to define based on which instance variables(heigh or weight) the comparison will be.
However, the == operator will still return results based on the memory location of the two objects(person1 and person2).
For ease of generalizing this person object comparison, I have created the following test class. Experimenting on these concepts will reveal tons of facts.
package com.tadtab.CS5044;

public class Person {

private double height;
private double weight;

public double getHeight() {
    return height;
}

public void setHeight(double height) {
    this.height = height;
}

public double getWeight() {
    return weight;
}

public void setWeight(double weight) {
    this.weight = weight;
}

@Override
public int hashCode() {
    final int prime = 31;
    int result = 1;
    long temp;
    temp = Double.doubleToLongBits(height);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    return result;
}

@Override
/**
 * This method uses the height as a means of comparing person objects.
 * NOTE: weight is not part of the comparison criteria
 */
public boolean equals(Object obj) {
    if (this == obj)
        return true;
    if (obj == null)
        return false;
    if (getClass() != obj.getClass())
        return false;
    Person other = (Person) obj;
    if (Double.doubleToLongBits(height) != Double.doubleToLongBits(other.height))
        return false;
    return true;
}

public static void main(String[] args) {

    Person person1 = new Person();
    person1.setHeight(5.50);
    person1.setWeight(140.00);

    Person person2 = new Person();
    person2.setHeight(5.70);
    person2.setWeight(160.00);

    Person person3 = new Person();
    person3 = person2;

    Person person4 = new Person();
    person4.setHeight(5.70);

    Person person5 = new Person();
    person5.setWeight(160.00);

    System.out.println("is person1 == person2 ? " + (person1 == person2)); // false;
    System.out.println("is person2 == person3 ? " + (person2 == person3)); // true
    //this is because perosn3 and person to refer to the one person object in memory. They are aliases;
    System.out.println("is person2.equals(person3) ? " + (person2.equals(person3))); // true;

    System.out.println("is person2.equals(person4) ? " + (person2.equals(person4))); // true;

    // even if the person2 and person5 have the same weight, they are not equal.
    // it is because their height is different
    System.out.println("is person2.equals(person4) ? " + (person2.equals(person5))); // false;
}

}

Result of this class execution is:
is person1 == person2 ? false
is person2 == person3 ? true
is person2.equals(person3) ? true
is person2.equals(person4) ? true
is person2.equals(person4) ? false

Answer: Just remember that .equals(...) has to be implemented by the class you are trying to compare. Otherwise, there isn't much of a point; the version of the method for the Object class does the same thing as the comparison operation: Object#equals.
The only time you really want to use the comparison operator for objects is wen you are comparing Enums. This is because there is only one instance of an Enum value at a time. For instance, given the enum
enum FooEnum {A, B, C}

You will never have more than one instance of A at a time, and the same for B and C. This means that you can actually write a method like so:
public boolean compareFoos(FooEnum x, FooEnum y)
{
    return (x == y);
}

And you will have no problems whatsoever.
Answer: When you evaluate the code, it is very clear that (==) compares according to memory address, while equals(Object o)  compares hashCode() of the instances.
That's why it is said do not break the contract between equals() and  hashCode() if you do not face surprises later.
    String s1 = new String("Ali");
    String s2 = new String("Veli");
    String s3 = new String("Ali");

    System.out.println(s1.hashCode());
    System.out.println(s2.hashCode());
    System.out.println(s3.hashCode());

    System.out.println("(s1==s2):" + (s1 == s2));
    System.out.println("(s1==s3):" + (s1 == s3));

    System.out.println("s1.equals(s2):" + (s1.equals(s2)));
    System.out.println("s1.equal(s3):" + (s1.equals(s3)));

    /*Output
    96670
    3615852
    96670
    (s1==s2):false
    (s1==s3):false
    s1.equals(s2):false
    s1.equal(s3):true
    */

Answer: The major difference between == and equals() is
1) == is used to compare primitives.
For example :
        String string1 = "Ravi";
        String string2 = "Ravi";
        String string3 = new String("Ravi");
        String string4 = new String("Prakash");

        System.out.println(string1 == string2); // true because same reference in string pool
        System.out.println(string1 == string3); // false

2) equals() is used to compare objects.
For example :
        System.out.println(string1.equals(string2)); // true equals() comparison of values in the objects
        System.out.println(string1.equals(string3)); // true
        System.out.println(string1.equals(string4)); // false

Answer: Example 1 -
Both == and .equals methods are there for reference comparison only. It means whether both objects are referring to same object or not.
Object class equals method implementation
public class HelloWorld{
     public static void main(String []args){
       Object ob1 = new Object();
       Object ob2 = ob1;
       System.out.println(ob1 == ob2); // true
       System.out.println(ob1.equals(ob2)); // true
     }
}

Example 2 -
But if we wants to compare objects content using equals method then class has to override object's class equals() method and provide implementation for content comparison. Here, String class has overrided equals method for content comparison. All wrapper classes have overrided equals method for content comparison.
String class equals method implementation
public class HelloWorld{
     public static void main(String []args){
       String ob1 = new String("Hi");
       String ob2 = new String("Hi");
       System.out.println(ob1 == ob2); // false (Both references are referring two different objects)
       System.out.println(ob1.equals(ob2)); // true
     }
}

Example 3 -
In case of String, there is one more usecase. Here when we assign any string to  String reference then string constant is created inside String constant pool. If we assign same string to new String reference then no new string constant is created rather it will refer to existing string constant.
public class HelloWorld{
     public static void main(String []args){
       String ob1 = "Hi";
       String ob2 = "Hi";
       System.out.println(ob1 == ob2); // true
       System.out.println(ob1.equals(ob2)); // true
     }
}

Note that it is generally necessary to override the hashCode method whenever this method is overridden, so as to maintain the general contract for the hashCode method, which states that equal objects must have equal hash codes.
Java API equals() method contract
Answer: Also note that .equals() normally contains == for testing as this is the first thing you would wish to test for if you wanted to test if two objects are equal.
And == actually does look at values for primitive types, for objects it checks the reference.
Answer: == operator always reference is compared. But in case of

equals() method

it's depends's on implementation if we are overridden equals method than it compares object on basic of implementation given in overridden method.
 class A
 {
   int id;
   String str;

     public A(int id,String str)
     {
       this.id=id;
       this.str=str;
     }

    public static void main(String arg[])
    {
      A obj=new A(101,"sam");
      A obj1=new A(101,"sam");

      obj.equals(obj1)//fasle
      obj==obj1 // fasle
    }
 }

in above code both obj and obj1 object contains same data but reference is not same so equals return false and == also.
but if we overridden equals method than
 class A
 {
   int id;
   String str;

     public A(int id,String str)
     {
       this.id=id;
       this.str=str;
     }
    public boolean equals(Object obj)
    {
       A a1=(A)obj;
      return this.id==a1.id;
    }

    public static void main(String arg[])
    {
      A obj=new A(101,"sam");
      A obj1=new A(101,"sam");

      obj.equals(obj1)//true
      obj==obj1 // fasle
    }
 }

know check out it will return true and false for same case only we overridden

equals method .

it compare object on basic of content(id) of object

but ==

still compare references of object.
Answer: It may be worth adding that for wrapper objects for primitive types - i.e. Int, Long, Double - == will return true if the two values are equal.
Long a = 10L;
Long b = 10L;

if (a == b) {
    System.out.println("Wrapped primitives behave like values");
}

To contrast, putting the above two Longs into two separate ArrayLists, equals sees them as the same, but == doesn't.
ArrayList<Long> c = new ArrayList<>();
ArrayList<Long> d = new ArrayList<>();

c.add(a);
d.add(b);
if (c == d) System.out.println("No way!");
if (c.equals(d)) System.out.println("Yes, this is true.");

Comment: Wrapper objects for primitive types - i.e. Integer, Long, Double == may not return true even if the two values are equal. It purely depends on Wrapper's cache.

Below code will print false because default cache is limited to -128 to 127.
                `Long a = 128l;
  Long b = 128l;
  System.out.println(a == b);`
Answer: == can be used in many object types but you can use Object.equals for any type , especially Strings and Google Map Markers.
Answer: public class StringPool {

public static void main(String[] args) {

    String s1 = "Cat";// will create reference in string pool of heap memory
    String s2 = "Cat";
    String s3 = new String("Cat");//will create a object in heap memory

    // Using == will give us true because same reference in string pool

    if (s1 == s2) {
        System.out.println("true");
    } else {
        System.out.println("false");
    }

    // Using == with reference and Object will give us False

    if (s1 == s3) {
        System.out.println("true");
    } else {
        System.out.println("false");
    }

    // Using .equals method which refers to value

    if (s1.equals(s3)) {
        System.out.println("true");
    } else {
        System.out.println("False");
    }

    }
  }

----Output-----
   true
   false
   true
Answer: Since Java doesn't support operator overloading, == behaves identical
for every object but equals() is method, which can be overridden in
Java and logic to compare objects can be changed based upon business
rules.
Main difference between == and equals in Java is that "==" is used to
compare primitives while equals() method is recommended to check
equality of objects.
String comparison is a common scenario of using both == and equals() method. Since java.lang.String class override equals method, It
return true if two String object contains same content but == will
only return true if two references are pointing to same object.
Here is an example of comparing two Strings in Java for equality using == and equals() method which will clear some doubts:
 public class TEstT{

        public static void main(String[] args) {

    String text1 = new String("apple");
    String text2 = new String("apple");

    //since two strings are different object result should be false
    boolean result = text1 == text2;
    System.out.println("Comparing two strings with == operator: " + result);

    //since strings contains same content , equals() should return true
    result = text1.equals(text2);
    System.out.println("Comparing two Strings with same content using equals method: " + result);

    text2 = text1;
    //since both text2 and text1d reference variable are pointing to same object
    //"==" should return true
    result = (text1 == text2);
    System.out.println("Comparing two reference pointing to same String with == operator: " + result);

    }
    }

Answer: The String pool (aka interning) and Integer pool blur the difference further, and may allow you to use == for objects in some cases instead of .equals
This can give you greater performance (?), at the cost of greater complexity.
E.g.:
assert "ab" == "a" + "b";

Integer i = 1;
Integer j = i;
assert i == j;

Complexity tradeoff: the following may surprise you:
assert new String("a") != new String("a");

Integer i = 128;
Integer j = 128;
assert i != j;

I advise you to stay away from such micro-optimization, and always use .equals for objects, and == for primitives:
assert (new String("a")).equals(new String("a"));

Integer i = 128;
Integer j = 128;
assert i.equals(j);

Answer: In short, the answer is "Yes".
In Java, the == operator compares the two objects to see if they point to the same memory location; while the .equals() method actually compares the two objects to see if they have the same object value.
Answer: It is the difference between identity and equivalence.
a == b means that a and b are identical, that is, they are symbols for very same object in memory.
a.equals( b ) means that they are equivalent, that they are symbols for objects that in some sense have the same value -- although those objects may occupy different places in memory.
Note that with equivalence, the question of how to evaluate and compare objects comes into play -- complex objects may be regarded as equivalent for practical purposes even though some of their contents differ.  With identity, there is no such question.
Answer: Basically, == compares if two objects have the same reference on the heap, so unless two references are linked to the same object, this comparison will be false.
equals() is a method inherited from Object class. This method by default compares if two objects have the same referece. It means:
object1.equals(object2) <=> object1 == object2
However, if you want to establish equality between two objects of the same class you should override this method. It is also very important to override the method hashCode() if you have overriden equals().
Implement hashCode() when establishing equality is part of the Java Object Contract. If you are working with collections, and you haven't implemented hashCode(), Strange Bad Things could happen:
HashMap<Cat, String> cats = new HashMap<>();
Cat cat = new Cat("molly");
cats.put(cat, "This is a cool cat");
System.out.println(cats.get(new Cat("molly"));

null will be printed after executing the previous code if you haven't implemented hashCode().
Answer: In simple words, == checks if both objects point to the same memory location whereas .equals() evaluates to the comparison of values in the objects.
Answer: equals() method mainly compares the original content of the object.
If we Write
    String s1 = "Samim";
    String s2 = "Samim";
    String s3 = new String("Samim");
    String s4 = new String("Samim");

    System.out.println(s1.equals(s2));
    System.out.println(s2.equals(s3));
    System.out.println(s3.equals(s4));

The output will be
true
true
true

Because equals() method compare the content of the object.
in first System.out.println() the content of s1 and s2 is same that's why it print true.
And it is same for others two System.out.println() is true.
Again ,
    String s1 = "Samim";
    String s2 = "Samim";
    String s3 = new String("Samim");
    String s4 = new String("Samim");

    System.out.println(s1 == s2);
    System.out.println(s2 == s3);
    System.out.println(s3 == s4);

The output will be
true
false
false

Because == operator mainly compare the references of the object not the value.
In first System.out.println(), the references of s1 and s2 is same thats why it returns true.
In second System.out.println(), s3 object is created , thats why another reference of s3 will create , and the references of s2 and s3 will difference, for this reason it return "false".
Third System.out.println(), follow the rules of second System.out.println(), that's why it will return "false".
Answer: In Java, == and the equals method are used for different purposes when comparing objects. Here's a brief explanation of the difference between them along with examples:
== Operator:
The == operator is used for reference comparison. It checks whether two references point to the exact same object in memory.
Example:
String str1 = new String("Hello");
String str2 = new String("Hello");
String str3 = str1;

System.out.println(str1 == str2); // false (different objects)
System.out.println(str1 == str3); // true (same object)

In the example, str1 and str2 are different objects with the same content, but == returns false because it checks for reference equality. str3 points to the same object as str1, so str1 == str3 returns true.
equals Method:
The equals method is used for content or value comparison. It is meant to be overridden in custom classes to provide a meaningful comparison based on the object's contents.
Example:
String str1 = new String("Hello");
String str2 = new String("Hello");

System.out.println(str1.equals(str2)); // true (content-based comparison)

In this example, equals is overridden in the String class to compare the content of the strings. Therefore, str1.equals(str2) returns true because the content of the strings is the same.


Should I use salted or unsalted butter if the recipe doesn't specify?

Question: When recipes call for "butter" but doesn't specify "salted" or "unsalted", which should I use? Does it matter?
Comment: Where's the recipe from? That might also matter: At least in Germany, butter is usually unsalted, so that's usually the assumption in German recipes.
Comment: Ditto for France, unsalted is the norm.  Unless you're in Brittany, but that's another story.
Answer: Generally, you should use unsalted butter. You can always add salt to your unsalted butter, but you can't take it out if you want it less salty!
If it's just being melted on some vegetables, then salted butter is probably fine. However, different brands of salted butter have different amounts of salt added, which makes it difficult to know how much total salt is going into your food. This is more problematic in baking. It's possible to easily oversalt or undersalt just by using a different brand — leading to unpredictable results. By using unsalted butter, the only salt remaining in the recipe is what you have added, and you have more careful control over the outcome.
If you need to substitute one for another, you can estimate how much salt is in salted butter and adjust your recipe accordingly.

If you are not sure whether a particular recipe calls for salted or unsalted, look for clues.

Is there additional salt in the recipe? (If not, it may expect some salt from the butter. If so, it may expect unsalted butter!)
How old is the recipe? (Newer recipes tend to assume unsalted butter. Older recipes tend to assume salted butter.)
Where was the recipe written? Different cultures assume different butters (and salt levels may vary between countries for salted butter!); I will not give an exhaustive list here, mostly because I don't know, but it's worth researching.

If you have the time, interest, and money, you can try making the recipe twice (once with salted, once with unsalted butter) and see which tastes better. This is a bigger investment, though, so only worth doing if you really want to get the recipe as good as possible.
Comment: @Gherman "Salted butter is generally used as a condiment because of its strong taste and longer shelf life, whereas unsalted butter is usually used for baking and cooking so that the cook can better control the sodium content and flavor in their dish!" https://www.tillamook.com/community/blog/battle-of-the-butters-salted-butter-vs-unsalted-butter/
Comment: @Chloe — using salt as a preservative for butter was a *much* more significant factor before refrigeration became widespread. (Also, [bacteria apparently _can_ grow in butter](https://www.bostonglobe.com/lifestyle/2013/02/13/ask-martha-keeping-butter-from-contamination/NvQ3CR4JZCvZa0pp2047LP/story.html), so it's worth at least being aware of the difference.)
Comment: @Erica These days, a more significant shelf life issue is picking up flavours/smells from other things it's stored alongside in the fridge, in my experience. Although maybe that's just my kitchen hygiene. ;)
Answer: It does matter, using salted butter changes the salt content of the dish, which will change the flavor.  It probably won't greatly affect the chemistry of a dish aside from that, however.
In my experience it's much more common to see unsalted butter in recipes, so I almost always default to unsalted if the recipe doesn't specify.
If they meant salted butter and I use unsalted, I can usually fix it by adding salt.  The only real advantage of salted butter is its longer shelf life.
Comment: ...Let it be known I once accidentally spread unsalted butter on bread. I learned that unsalted butter is the flavor of sadness. I tried to rectify the error by sprinkling over some salt, but it only succeeded in accentuating the existing flavor, sadness, bringing the subtle notes of shame and despair to the forefront..... Cinnamon-sugar and the broiler took care of it though!
Comment: Well, the other advantage of salted butter is that it tastes nicer spread on bread (modulo personal opinion).
Comment: @DavidRicherby Try sprinkling a little coarsely ground salt on unsalted buttered bread and get the best of both worlds. :-D
Comment: @Martin - You really need to try a sandwich filled with thickly sliced mature cheddar cheese (v. salty) and thickly spread strawberry jam (v. sweet); you will be very pleasantly surprised :-)
Comment: @kitukwfyer - Let it be known ... that with the right kind of bread, and the right kind of butter(!), unsalted butter bread is delicious! And as an aside to the aside: How can you people stand eating sweet jam with salted butter. Bäh! :-D
Comment: @Spratty Never tried it with jam, but cheese and marmalade are to die for. I probably have had it in a sandwich, but more commonly as slices of cheese laid over marmalade-on-toast.
Comment: The shelf life may be slightly longer for salted, but in these days of refrigeration it's more likely due to a lower-quality butter with preservatives than to any real effect from salt alone. And historically salted butter was lower quality, because salt was also used to disguise the lack of flavor.
Answer: Good question!
It depends on the dish being made. Easy rule of thumb:

Savory/seasoned as a main dish or meat = salted butter
Sweet, fruit or greens heavy = unsalted
Also - you can make melted/browned butter easily, by slowly melting the butter so you have a stable cooking medium.
Answer: This may be somewhat country-specific.  Here in the UK, sweetness levels which may be considered normal for the US palate are generally considered overkill here.  Using salted butter can provide a balance to the flavour which is missing in unsalted butter.
Adding salt separately can solve that problem, of course.  But with salt levels being relatively consistent in  butter over here, and with most people who do use real butter as a spread using salted butter, my experience is that UK recipes are more likely to assume salted butter unless otherwise stated.
Comment: @DavidRicherby The other way around - the salt compensates for an *excess* of sweetness.  It's most evident in high-sugar baked goods such as flapjacks, but also in buttercream icing.  I'm afraid I can't give a citation for my personal experience or my taste in baking though. :)
Comment: @DavidRicherby Salt and sugar together do interesting umami things to your tastebuds, so reducing the amount of sugar does not do the same thing as adding salt.  There are also some processes (e.g. emulsifying buttercream) which need the sugar.  So a recipe may assume that you're using salted butter and then not have "1/2 tsp salt" in the recipe, which otherwise would be needed for using unsalted butter.
Comment: @Pod Perhaps just different experiences.  David's experience is that "everybody knows you use unsalted butter for baking".  My experience is that "everybody I know uses salted butter for everything unless otherwise specified", because with salted butter being way more common in everyday use, why would a recipe secretly hope that you weren't going to use the butter you had already?  Either way, it's something we can both live with, so long as we can be more specific in recipes. :)
Comment: "my experience is that UK recipes are more likely to assume salted butter unless otherwise stated." [citation needed] And how would adding salt compensate for a lack of sweetness?
Comment: OK. So why would a UK recipe compensate for sweetness by secretly hoping that you use salted butter, rather than just reducing the amount of sugar? That makes no sense, especially as "everybody knows" that you use unsalted butter for baking.
Comment: @DavidRicherby you can use the polite phrase [citation needed] to rudely say "I don't believe your personal experience" all you like, but you're still wrong. In the UK, butter is salted unless stated otherwise. I've provided sources in my answer.
Answer: In the UK, if a recipe just calls for "butter", it is asking for salted butter.
This is because historically all butter was "salted butter", with "unsalted butter" being very expensive before the advent of refrigeration due to its low shelf life.
Additionally, the majority of products labelled "butter" will be salted butter, with the unsalted butter being explicitly labelled "unsalted butter", e.g. Compare the marketing of major brands in the UK in their use of butter vs unsalted butter:

http://www.kerrygold.co.uk/home/products/
https://www.arlafoods.co.uk/brands/butter-and-spreads/
https://www.dairycrest.co.uk/brands/butters-spreads-oils/country-life/

Here is another source:
https://www.statista.com/statistics/301909/leading-brands-of-butter-in-the-uk/
What's interesting is that, with the prevalence of internet-based recipes from the US and other English-speaking countries, the term "salted" is now being applied to plain old "butter". e.g. I remember about 5 years ago Sainsbury's started calling butter "salted butter", which confused my partner at the time as she just wanted "butter", thinking this was an extra salty butter.
Comment: The default in labeling is not necessarily the same thing as the default in recipes. It's true in the US as well that salted butter is often simply labeled butter. But still, it's also common to expect to use unsalted butter in recipes, especially baking. Do you have anything about that side of things?
Comment: ....If you're right, then that actually explains why European recipes seem to forget the salt all the time. I mean, sometimes it made me worry if y'all were really okay over there. That does make me wonder though if your regular butter is extra salty compared to American "salted butter"? I wouldn't think so, but clearly I've never been anywhere, lol.
Answer: Salt and butter have two very different functions. Using them together does not allow you to control them separately. For example, if you need more fat but the dish is already salted, you need butter but not salt. Therefore, if you want to be as accurate as possible, use unsalted butter.
Answer: Just a note on all of this - it is not necessarily just about the taste. A few people have touched on the shelf life, which also makes a difference.
Salted butter is designed to last longer, therefore when doing things like baking - where you want to use the freshest ingredients for a better result - you should always use unsalted, because it will be fresher. (Especially true when making "challenging" things like pastry).
Comment: Exactly what @Matthew Read said. "Designed to last longer" gives a result that is "still edible and not dangerous" rather than "fresh". Not the same thing at all.
Comment: @DavidRicherby That is certainly not true.  There are various measures of freshness, not all of which are helped by salt.  Salt's primary use in butter is to prevent microbial growth, and it might have some effect on retaining moisture, but not on oxidation.  And it might increase the absorption of smells from the fridge, etc.
Comment: Sorry but this doesn't make sense. "Last longer" means exactly the same thing as "stays fresh longer". The age of the product is irrelevant: what you care about is how much its quality has deteriorated during that time. And, since salted butter deteriorates more slowly, you can use older salted butter and it will be just as fresh (i.e., will have deteriorated the same amount) as newer unsalted butter. Indeed, if I buy salted and unsalted butter today, by your argument, I should use the salted butter to bake with, because it will be fresher!
Answer: If it's a recipe for homemade bread they say it's best to use unsalted butter because salt tempers yeast activity, therefore, theoretically, using salted butter would raise salt content (slightly) and possibly lengthen rising time, lessen oven "blooming", and up the finished saltiness of baked bread.  Regardless, I don't find it makes that much difference, for bread baking anyway.
Answer: There is no such thing as unsalted butter. Butter is just made of milk, without salt or any other additive. If you add salt to it, it becomes salted butter, which is a different thing than butter.
That said, the word "butter" can sometimes refer to salted butter in some countries like the UK. In countries like France, butter is normally sold unsalted, and salted butter is considered like butter with an additive (salt).
So if the recipe needs butter, just take what is the default in the country of origin of the recipe book. If you don't know, just take unsalted butter, it's always easier to add salt afterwise than trying to desalt your butter :-).
Comment: In much of the English-speaking world this may be logical but it isn't true. The default can in fact be assumed to be salted (in that there's more choice of brands and price points for salted, and some small shops  only stock salted)
Comment: What you say about "unsalted" butter is true, but it does not necessarily carry through to recipes. Given the proliferation of salted butter and the fact that it is generally the default in the supermarket (giving rise to the term "unsalted butter" to differentiate), many of the recipe books I have will specifically state "unsalted butter" if it's considered important. Otherwise it is unspecified, which seems like "meh, either" to me :P
Comment: Linguistically true, but is that the same as how the term is colloquially used?
Comment: So it actually depends where you're from. In France, butter is de facto unsalted, and butter refers to unsalted butter. It seems so much more logical that way. I don't think I deserve that -1.
Comment: Updated my answer to take account of country specifics


iCalendar on elementaryOS

Question: Is there a way of adding my iCalendar to the native Calendar app of elementary OS?
I imagine that I should find a CalDav link for that.
Answer: You're right. If you know your CalDav URL, then it's simple to add to Calendar.
In Calendar, you can click on the gear icon, then click Add New Calendar.... For Type, select "CalDav", then enter the CalDave URL along with your username and password. Click Create Calendar and your events should begin syncing.
Answer: It took me a while, but I figured it out. elementary's Calendar app does not support the webDav format, which is what is needed. For accessing the iCalendar, you can install the California calendar application which supports the specific format.

iCalendar on elementaryOS


water draining from toilet after flush

Question: I live in a two storey house with 3 toilets (two on second floor and one on the main floor)  the main floor toilet after flushing drains to a low level . I have inspected for water under and around toilet and even underneath in basement and now water , I have replaced the fill tube and the gasket between tank and bowl. if the vent was restricted would that not affect all toilets. any thoughts
Comment: There may be separate vent pipes for the various sinks and toilets. If all three of your toilets were arranged such that the two upstairs were back to back and the one on the first floor was directly under one of those upstairs then it is possible that they are all served by one vent stack. Since the symptom that you are seeing is often caused by vent issues your down stairs toilet may very well be on a separate vent.
Comment: thanks for the input only have one vent stack and one of the upstairs is above the one downstairs I will keep trying
Answer:
"after flushing drains to a low level"

The level in the bowl after flushing is determined by:

the length of time the flapper is held open (not open long enough = no flush, inadequate flush, or low water level in bowl after flush)

AND

the bowl-filler function of the fill valve in the tank/cistern. Commonly, the bowl-filler function is arranged such that a hose directs water into the bowl (usually via the overflow tube and rim clean holes) during the entire time the fill valve is open. Some fill valves allow adjustment of the bowl-filler duration/flow/volume.

If it were a venting problem, it would occur at random times (or specific times if related to other usage of drains), rather than only when the toilet in question were flushed...

water draining from toilet after flush


how to correct a problem with my sourdough starter

Question: My boss gave me a sourdough starter that I've had on my counter for a week. I"ve fed it with just equal parts of flour and water without wasting the starter in order to increase the amount. it has increased in the amount, but have I made the starter less effective? My starter does have bubbles and it also has some fluid on top. how can i get what i have ready to use?
Comment: I find this description a bit strange. On a standard feeding schedule, without discarding, you should have doubled the starter every day. For 7 days, you should have increased the amount 128 times - if the boss gave you 100 g to start with (a not quite full glass of baby food) after 7 feedings you would have 12.8 kg of starter. Is it possible that you used less than double the old amount when feeding, or fed rarer than every day?
Answer: When there's liquid on top your starter it past the really active stage (or you put too much water). If the liquid smells alcoholic, even more so but don't worry, these beasties are practically indestructible.
You can rejuvenate it by adding a couple of tablespoons of the starter (after discarding the liquid) to equal weights(not volumes) flour and water. I tend to go 40g starter to 80g flour+80g water which I then use to make poolish every 3-4 days or so (which I then use to bake 2 loaves using ~500g of flour). Once I make the poolish, I remove ~40g of flour and the cycle goes on. Remember, no salt goes in the poolish(or starter for that matter)!
If you bake less frequently than every few days go slightly drier: 100g flour/60 water to 40g starter - your starter will stay active for longer but it will also taste more sour as you leave it. If you bake really rarely, like once a month, you can keep it in the fridge and rejuvenate as above a 2ple of days ahead of baking, discarding what remains of 40g.
Finally, if you are wanting to keep a starter with rye, disregard the above- rye tends to mould more easily so you have to be vigilant with your feeds (although you can just give your starter a rye feed every once in a while to no ill effects in my experience)
Answer: From your description it doesn't sound very active.  The reason to discard some of the starter before feeding is so that you keep the acidity in check.  How much you have at this point is unclear.  If it were me, I would mix well, then discard all but a tablespoon or so.  Feed with equal parts flour and water...a couple of tablespoons of each.  Leave it for 12 hours, then build up from there.
Comment: Is bringing it down to a tablespoon before rebuilding that much more effective than, say, discarding half then building it back up it back up?  I'm not that familiar with starters, so not disagreeing, just asking since it seems like a lot to toss
Comment: I guess that is the smallest amount I would do, not knowing how much the OP has.


I'm setting up a Cisco CCNA lab, what equipment would you recommend?

Question: Is it okay to use a Cisco 2948 for CCNA students, after all it's cheaper to get these switches and they have more features? Wouldn't this be better than a 2950 switch?
Comment: In the planning, I believe that certification questions were decided as being outside the scope of this site.  This skirts on the edge of that decision and should probably be re-written to avoid it.
Comment: @DaveNoonan: As it's written now, I'm reading it as a specific question; what hardware, perhaps the model he suggests, could he use for this specific purpose. I'm reading this as a questions about 2948/2950, more than a question about the CCNA. On the other hand, post a Q in meta if you disagree.
Answer: CCNA requires the student to be familiar with the IOS operating system, this makes the Cisco 2948 unusable for a CCNA lab as it runs Catalyst OS (CatOS) and there is no way to upgrade the operating system from CatOS to IOS.  So while it may have  more features, for a pure CCNA lab it's not really usable.
Personally I would also recommend the following equipment (if you are not opting for GNS3):

2 x Cisco 2610XM Advanced  Fast Ethernet 128Mb Dram / 32mb flash IOS 12.4
Adv Security
Cisco 1760 Fast Ethernet 64Mb Dram / 32mb flash IOS 12.4 Adv Security
3 x WIC-1T for the two 2600 routers
2 x Cisco ws2950
Answer: One thing to bear in mind with the CCNA is that the vast majority of the things you need to play with are trivially done in Cisco Packet Tracer and GNS3 (especially since you can now get a switchport card working in GNS3 now). However, with that said, depending on how you learn, you might prefer to work with a physical setup, and if that's within your budget, go for it.
In any case, I'd definitely recommend against foregoing any sort of usage of PT/GNS3, not least because something like GNS3 can actually be used to augment your lab setup - hook it up to your physical gear and run wild.
Comment: +1 for Cisco Packet Tracer. It's specifically designed for CCNA and covers everything you will need (and more as it now supports BGP). You can create some fairly complex networks in Packet Tracer! http://freeciscolab.com/2012/05/09/cisco-packet-tracer-activity-bgp-multipath-redistribution/
Answer: Wendell Odom's website has a lot of great info, including lab equipment recommendations for CCNA and CCNP.
I also started a Whirlpool thread a few years ago for those studying for the CCNA and CCNP certs. There is a lot of great info in there. We also turned it in to a wiki as well.
If you're wanting to save a bit of money, you can use GNS3 for the routers and then just buy some switches. I have written a few blog posts about how you can connect virtual equipment to physical equipment.
I prefer the virtual router + physical switch approach over the full physical lab as it saves money, energy and power points :) It's also good because you can take your virtual router topologies with you everywhere you go.
Comment: This is my preferred approach; i can't see the need for physical routers at all.  Although i do confess a minor nerd love affair with my 1841 routers, which just never seem to die and can do basically anything.
Answer: One of the best ways to get a lab for the CCNA is to get your hands on a copy of the Packet Tracer utility used in the Cisco Networking Academy courses.  It contains the full spectrum of "equipment" and commands you will need.  However, I don't know if there's another legit way to get it other than enrolling in the course itself.
One other thing to note as well, if you are on a tight budget, don't worry about an expensive switch that can do QOS and Layer 3 because the CCNA focuses on nothing above layer 2 and nothing really fancy (no QinQ, etc).  VTP and (Rapid) Spanning Tree will be about the most "complicated" switching topics you'll have.  Given this, a 2950 will serve you well and you can get those for less than $50 a pop on ebay.
Answer: I just got my CCNA not more than 2 wks ago, and the only hardware I purchased was a C2950 for $30. Everything else was virtual. Both GNS3 and Packet Tracer are helpful overall, but neither is without its bugs. I preferred GNS3, simply because it's easier to connect a virtual GNS3 network to real hardware (like my C2950), or arbitrary virtual hosts (like Qemu or VMWare guests). But I will say this: doubt instead of trust in the correctness of the simulation software can really slow down your learning.The actual C2950 hardware either worked as expected, or somewhere I made a mistake. But with GNS3 for example, you have to ask yourself whether you made a mistake or the software did.
For maximum reliability, buy the real hardware if your budget allows. Expect to spend a fair amount of time figuring out how to get GNS3 to work, and handling exceptions. But even with the faults of the emulators, it's a good idea to consider GNS3 because it's possible to create all kinds of near-realistic scenarious quickly and cheaply.
Answer: For basic familiarity with Catalyst IOS switching, I've often had folks check out the 3550 switch.  It isn't capable of certain features (QoS, Private VLANs, etc); however those don't come into play at the CCNA level.   3550's can be had for pretty cheap on eBay, last I checked, under $100.
(Also worth noting: if you have a POE 3550, you have to manually configure access ports as trunk ports for separation of voice/data VLANs)
If you want more functionality and a more recent IOS version, the 3560 can be found for $100-300.
EDIT--
3550's do have QOS capabilities as pointed out in the comments below, see this document on 3550 QOS setup.  I was meaning that it isn't capable of doing MQC style QOS.
Comment: I'm not sure where you have got your info from but the 3550 definitely does support QoS. Its not the regular MQC style that you would use on a router but it supports QoS non the less.
Comment: True, I'll edit it to be more clear above.  I always just think of MQC.  Thanks!
Answer: Packet Tracer and GNS3 are highly recommended based on the fact that you can get them at no cost. When using Packet Tracer it is also quite useful in familiarising yourself with what the exams sims are like.
However if you can afford it there's nothing like getting your hands on real kit and getting used to the different physical cables, especially if you don't currently work as an engineer.  As the CCNA requires you to know stuff about the kit like how it boots, flash, moving config & IOS files around from tftp etc, then if you have some real kit you can take a look inside and have a go at upgrading the flash for example, which really helps the theory click into place.
2500 series & 2950 Cat switches are probably the cheapest option that will do it but if you are serious about certification and want to go beyong CCNA level then you'll want to consider building your lab for the future.  So if you can afford it i'd recommend some 1841's for your routers as they are really reasonably priced nowadays on eBay and then (again if you can afford it) get some 3350 switches which you can then load IOS capable of L3 switching and routing protocols.
Answer: My suggestion is that you go ahead and practise a lot with Cisco packet tracer and Gns3 which is more than enough for CCNA level.
Also recently I have completed my CCNA R&S v3.0 certification.
I have gone through whole Cisco 200-125 Books and then started practising scenarios and I have used cisco 2900, 3650, 3700 and 3560 switches.
Better use Gns3 where you'll have a hands on with IOS.


Geometry vs sprites

Question: I'm developing an android game, where the enemies are geometrical shapes. Performance is a main goal for me so I was wondering if defining shapes directly in OpenGL would be more efficient than using sprites. Is it really faster or I'm missing something?
Answer: With meshes/geometry you can get better precision and look. Performance varies on shape complexity and size.
Every point/vertex is processed by vertex shader. Every face is rasterized to pixels. Every pixel is processed by fragment shader.
So if you are drawing rounded-corner rectangle then you would get better performance with sprite, because there is minimum of transparent pixels. If you are drawing shape like alphabet 'L' then you would probably get better performance with geometry, because of high amount of transparent pixels that are processed by fragment shader.
Answer: I think it also depends on how many shapes you're going to draw and how complex they are. If these are simple rectangles/triangles, you should choose to directly draw the geometry (because you're going to be drawing 2 triangles for each sprite anyway).
An advantage of using sprites (textured quads) is that your "sprite" can be arbitrarily complex and also have anti-aliased edges without much cost (because the edges are in the texture). This approach could potentially use a lot of graphics-memory if all your shapes happen to be different.
When drawing the geometry directly in OpenGL you don't have to care all that much about how many different shapes you have. It also works much better than the texture approach if you plan to scale your entities a lot. But if you want anti-aliased edges, you'll have to enable anti-aliasing which in turn has an impact on performance.
This probably doesn't answer your question directly. But I think the type of shape (how complex, how many different types of shapes) and how you're planning to animate it (will they be scaled, change color?) directly influence the performance of each approach.

Geometry vs sprites


Is dressing oneself in formal attire on Sundays (Sunday hat and dress) solely an American Christian custom?

Question: Before I start, I realize that this question is related to another question. However, this question is more concerned about the custom of wearing one's "Sunday best", which usually means a nicely brimmed Sunday hat and modest-looking dress. This has been portrayed in literature and in movies. Example: Chicken Sunday, written by Patricia Polacco, and Bridge to Terabithia (2007 movie). Is this solely an American Christian custom? Are there examples in other Christian cultures? How did this custom come about, and how did it evolve over time?
Comment: It's certainly common to dress to the nines for their first communion in Mexico--and as far as I know, in most or all Catholic churches.
Comment: This is a huge point of contention in Catholic America ever since Vatican 2.All the way up to the later half of the twentieth century Sundays best was the custom.these days dress code is so liberal ly interpreted in most places that you see kids teenagers in flip flops and cargo shorts and tee shirt.my grandmother is sometimes speechless at the audacity of some teenage girls wearing short shorts.We were raised to wear suits and ties.it would be interesting to see the international over view though for sure.
Comment: In Eastern Europe it is a strong custom, especially (but not exclusively) in rural areas.
Answer: I am unsure as to most other Christians. Among those that I have studied with and continue to study with they have always dressed formally.
I believe that Christians of any denomination dress nicely when going to worship god. It's part of giving god your best. Here in an article that may explain a bit better and I think it is relevant not only to witness', but all Christendom. Why dress up for meetings
This doesn't mean your clothes had to be expensive. As long as you are clean and presentable then that is acceptable.
It seems as far as history goes Christians not only wore, but where encouraged to wear simple clothing so as to not distract from the meaning of the occasion. This is especially true in the 18 and 19th centuries. Worshipers usually dressed plainly with no ornate jewelry and such. This is not only for the reason stated above, but that your everyday person didn't have the means to come by these things.
Origins /3rd Century changes / Why dress nice?
Based on a little more research it seems dressing up was a social status thing and then later became a part of representing and honoring god.
Answer: In the UK, customs vary wildly between churches. Catholic, High Anglican, Methodist and far-right baptist traditions tend to promote, at least implicitly, smart dress but with no particular dress codes. Pentecostal and Evangelical traditions tend to promote the relationship aspect of corporate worship, seeing church as a place for people to come into God's presence in safety and support, and so avoid the idea of "Sunday best" - often supported by 1 Samuel 16:7 (NIV):

7 But the Lord said to Samuel, 'Do not consider his appearance or his height, for I have rejected him. The Lord does not look at the things people look at. People look at the outward appearance, but the Lord looks at the heart.'

There is always a caveat that people should be dressed modestly - in a way that is not sexual or overly distracting from the main point of worship: communion with God. Some churches do follow a dress code very similar to that seen in America - for example in Brethren traditions. But these days, very few churches would pass comment if a person arrived shabbily dressed, and and in many churches jeans and tee-shirt might be considered the norm!


Can native Italian speakers read The Divine Comedy?

Question: I'm interested to know how hard it is for native Italian speakers to read The Divine Comedy in Dante's original language. The work was composed in the 14th century, so I imagine that there would be some difficulties. But I have no idea how well Italian was preserved between the 14th century and current times. Is the grammar mostly the same? The vocabulary? Would someone fluent in Italian be able to make out most of it?
Comment: It has  a lot to do with general education. An example that comes to my mind is this: most of Italians educated people are able to read simple warnings or even newspapers in french, even without having specifically studied french. Speaking (writing ) is a totally different exercise, tough.
Answer: Yes Italian speakers can read the Comedy. It usually requires some notes here and there, both due to the archaic language and to the historical references ( many people are likely to be unfamiliar with) but it can be done. In general the Inferno is the easiest part and the Paradiso is the hardest. The Comedy is usually read, at least in part, in high school.
Note that a large part of the difficulty comes from the fact that it is poetry rather than from the time difference. Boccaccio's Decameron, a work of more or less the same time period, can easily be read by educated Italians with only some notes to explain the more outdated references (similarly to how native English speakers can read Shakespeare's plays even if the language is not quite the same, what with all the thous and thees). To give you a sense of perspective of how little the language has changed, the Decameron was one of the inspirations for Chaucer's Canterbury Tales.
Comment: I am not sure, @LSerni, that the doctrinary part should contribute to the *linguistic* difficulty of reading the *Comedia* (this is what the OP is referring to, since he referred to grammar and vocabulary). To use your example, *Animal Farm* is very easy to read (as regards words and grammar structures), but even today, less then 700 years after its composition, someone could struggle with all the references and "messages" (excuse my French).
Comment: I'm upvoting this answer, but don't quite agree on the difficulty stemming from the fact it's poetry. The difficulty with the Comedy - a *doctrinary poem* - is in the doctrinary part. Reading it as the Decameron would be sort of, I don't know - like reading *Animal Farm* as if it was a *Watership Down* with pigs :-)
Answer:
I'm interested to know how hard it is for native Italian speakers to read The Divine Comedy in Dante's original language

Reading and understanding each word is relatively easy, not much less than a poetry from a century ago. I'd venture that about three-fourths of the words are still recognizable and have the same meaning.
Some did change in subtle ways; for example però currently is used as a synonym of ma: "È brutto, però è tanto ricco!". In Dante's times, that phrase would have meant that a person's ugliness was the reason of his richness: però means perciò, per questo, for this reason. "Trasumanar significar per verba non si porìa: però l'essemplo basti" - one can't explain transhumanization with verbal means, therefore let the example suffice.
Or the form of the verb credo, nowadays used in the dubitative form, "credo che pioverà" = I think, I suspect it might rain, was then used literally: "credo ch'io vidi" = I firmly believe, I know that I saw.
It is not however a great obstacle to enjoying the poetry and the literal meaning of the work.
But Dante's poetry, increasingly from Hell to Paradise, becomes fraught with double and triple meanings that were difficult to interpret even then (the Comedy itself in its entirety is a metaphor - an anagoge). Dante himself says, O voi ch'avete li 'ntelletti sani, mirate la dottrina che s'asconde dietro 'l velame de li versi strani: o you of sound intellect, behold the doctrine hidden behind the veil of strange verses.
Inside the Comedy there are references to physics, mathematics and geometry that require explanatory notes (these were actually difficult to grasp at the time, and much easier for us): o se del mezzo cerchio far si pote triangol sì ch'un retto non avesse is a reference to one of the circumference theorems. At the beginning of the Paradise Dante refers to the law of refraction, and soon after Beatrice in Canto II instructs him in detail on how to perform an experiment on the intensity of reflected light.
Nowadays most of the references would escape the casual reader. "Nel suo profondo vidi che si interna ... ciò che per l'Universo si squaderna", literally means that in the depths of God's light Dante sees the unity of That that expands then in the whole Universe. But interna also meant becoming three, and it's a reference to both the Trinity and the three teologal virtues, the virtues that relate to God; just as squaderna also means expanding into four, as the four cardinal virtues that relate to Man. So this vision is also a theological reaffirmation of Christian doctrine. This was an easy reference back then1.

(1) It was suspected, even not so long after (e.g. by Christopher Landino and others) that many other references (e.g. raia da l'un, se si conosce, il cinque e 'l sei) had further meanings, and some even came to believe that the Comedy might hide secret messages for nothing less than a secret society to which they maintain Dante must have belonged.
Answer: As answered above by Denis, reading it for an Italian native is not much concern.
The very concern stands in understanding it, even for a native, for several different reasons:

The work is sublime poetry
It's plenty of references: religious, philosophical, historical, astronomical which makes it very hard without a solid preparation.
To make an example, if reading a prose book for a native is as easy as walking,
reading the Comedy is like diving in the ocean where without study, effort, and a good annotated version even a native can drown.
Comment: I'm not sure I agree that it is *that* hard. With a well-annotated edition even a determined middle-schooler can go through the Comedy (with some effort, of course).
Comment: I disagree that reading the Comedy is like diving in the Ocean. A well educated native speaker should be able to do it without too much effort, since it is part of the standard high school curriculum. I think overemphasizing the difficulty of these things is just scaring away people.
Comment: Well, I'm not Florentine, I'm not even Italian, and I have read the *Inferno* and the *Purgatorio* without  drowning: I can assure you it has been an extraordinary experience. So, I completely agree with @DenisNardin previous comment.
Comment: What exactly would make hendecasyllables so hard to understand?
Comment: Yes, placed here can be misunderstood. thanks
Comment: Denis we said the same thing. I add your remark
Comment: I wrote at least without study. Which in my opinion is the truth, it's not a matter of scaring people. I am adding your comment to clarify better what my opinion is
Comment: @Charo Reading the *Divina Commedia* is possible, but would you understand what *Nel mezzo di cammin di nostra vita* exactly means without reading any note?


Wood pellets in a smoke box:

Question: Can I use wood pellets in a small stainless steel smoker box on my Weber gas bbq? And if I can any tips on how to proceed.
Answer: As long as they are designed for cooking/smoking (not treated wood pellets that you made yourself), no problem.  If it were me, I would ignite a small portion and allow to burn for 5 to 10 minutes, blow out the flame, then add fresh pellets to the already burning portion (without smothering).
Comment: and also make sure the smoke produced is pleasing in the way that hickory, oak, or other such woods are. Smoke without a pleasing scent does little to improve the food being smoked. Pellets are often ground up mill leavings and as such are rarely any particular variety *unless specified as such.*
Answer: My initial assumption was that wood pellets have some sort of binding chemical that holds them together. But, further research shows that when the sawdust is extruded under pressure and some heat, the wood releases a polymer that resides within a plant's cell walls called lignin, which binds the sawdust together and keeps the pellets in shape.

Wood pellets are made from compacted sawdust and woodchips. These are byproducts from sawmills and other industries that use wood. The pellets are formed under heat and pressure, which releases natural plant lignin that holds the pellets together without glue or additives.

University of Maine Extension: What We Have Learned About Heating With Wood Pellets in Maine
In other words, it looks like the wood pellets are just made of wood. As long as it's all hardwood, originally, you should be fine for smoking with them. You might want to go out of your way to find pellets that are labeled as "food grade." How to proceed? Just like you would with hardwood chips, I'd think.
When I use hardwood chips to smoke on my gas grill, I will soak them in water for about 15 minutes, drain them, put them into heavy duty aluminum foil packets, slit the packets in several places, then, when heating the grill, have all the burners on, and put the packets on, as well. You can do something similar with your metal box. I've read in places that soaking the chips might be completely unnecessary (the moisture is driven out of the chips before they start smoking anyway, I believe is the reason).
When the grill is hot and the packets are smoking, I turn off all the burners but one (not in the middle), and turn that burner down to where it needs to be to maintain a relatively low temperature for the smoking process (adjusting that burner level to keep it in my desired range), with the packets all moved over the active burner, and the meat receiving indirect heat.
When smoking meats, I usually have the pan with the meat in it covered loosely with foil that has been perforated repeatedly with holes, so smoke can move in and around the meat.
Answer: The answer is yes - I have used the following technique successfully with wood chips, so I suspect it will work with pellets:

make a small (approx 6 in x 4 in) , flattish (approx 1 inch high) pouch out of aluminium foil
fill with pellets
seal by folding edges
poke a few holes for air flow/smoke escape on top and bottom
Place directly on the flame diffusers (those sloped things above the flames)

You may have to play a bit with the heat setting, as this is burner dependent, but a low to mid heat should be enough. Make sure that you keep the lid down while smoking. 30 min of smoking is usually enough to flavor meat well for something like ribs or chickens.
Answer: Look for A-Maze-N - Their products are designed to add smoke. I have a 5x8 "Maze" (it looks like one of those brownies pans that makes every piece have two hard edges) that lasts for close to 10 hours with a couple of handfuls of pellets. They also have models that work with sawdust.
If you're doing pellets, don't use standard furnace pellets. Always use food-grade pellets.
Using an A-maze-n maze, after adding the pellets, you need a torch to light it off. A good cigar lighter works as does a culinary kitchen torch.

Wood pellets in a smoke box:


Ubuntu 12.10 not installing?

Question: I had downloaded Ubuntu 12.10 today morning, in torrent form, it was about 700 MB. Than I clicked the setup which is `Wubi.exe´. It completed the downloaded, than It stated "EXPANDING" , It expanded more than 50%, and now it (the progress) has stopped? It's been like 3 hours, and not a single percent has increased? What to do? As I am writing now, it's still showing expanding, Please Help, and by the way, I am new to Ubuntu
Answer: The best is to download it from ubuntu itself: http://www.ubuntu.com/download
If your on a windows machine you can choose the Windows installer. If your on an Ubuntu machine, download the iso file and then there are two options:

Burn the .iso to a CD/DVD or
use the Startup Disk Creater and create a startup up USB stick.

You can also follow a step by step guide for installing Ubuntu
http://www.ubuntu.com/download/help/install-desktop-latest
Cheers,
Erwin
Comment: So, by instead of 'burning' to a disc, can I use Daemon tools?
Comment: Ubuntu no longer fits in a CD. It can be burned either on a DVD, wasting a lot of space. Or a startup USB disk can be created. The later one is a better option, IMHO.
Answer: For a Wubi-installation (installing Ubuntu IN Windows) you don't have to download 700Mb;
simply download direct the Wubi-installer from the Ubuntu website.
In Windows execute the installer and you Ubuntu-version will be downloaded and installed in Windows. On boot you'll have a text-based option to choose Ubuntu for starting up (or Windows itself).
For setting up a dualboot (Ubuntu side by side with Windows on different partitions)
you'll need to download your complete Ubuntu-ISO and burn it to a disk (or making a bootable USB-stick). Then you'll have to boot from this burned disk in order to preform an installation.
For detailed instructions or usefull help click here.

Ubuntu 12.10 not installing?


Android: swipe vs long press

Question: We are working on messenger for Android. There is a quite controversial problem: we need to show a context menu for each message bubble after some action. We want to use swipes, but it's not native behavior for Android. Are long press or additional mini-buttion near each button better?
Answer: The normal User Experience convention would say that the long press is better because (almost) all the other messengers are using the same thing.
But, I am always against the long press option, it holds the user for a few seconds for what he/she was trying to achieve.
So, the deciding factor should be, If you do not want your users to waste your time (a few seconds) for long press, you should give little options on tap of the message like Facebook Messenger does.
Answer: I think long press better because other messengers such as WhatsApp, using long press action too and users know about long press when they using their phones.
Answer: Instagram has solved this problem - press briefly to comment on the right; to share the second button pops up action - showing that there are other buttons - once presses the second and eventually will use swipe - they are more friendly to man than the long press - holding, I feel out of date
You can find a compromise and use both options
Answer: Both options are learned behaviors. I wouldn't think one is better than the other (perhaps A/B testing would give you valuable information?) but none that neither behavior will be immediately understood without teaching the user first.
Answer: If you use a gesture differently than most other apps, you'll have trouble with initial user uptake - they'll install your app, fail to use it (because they expect it to work like other things on the system), and a large percentage will drop it because they can't make it work instantly.
These are learned behaviors, but they do NOT exist in a vacuum - if other apps all work a certain way, making yours different is going to be a disadvantage.

Android: swipe vs long press


Web server (on 1 machine) serving files from another machine EC2

Question: I am trying to setup the following configuration (or at least this is what I've got in my mind).

EC2 instance running the web server (Nginx or Apache)
EC2 instance where the actual site files are located. (an EBS volume is attached to it)
Backup EC2 instance, in case of failure of the 1st instance, it will be the main server.

I just want to know whether my idea is OK, or even if it is possible, it is totally bad, and disk performance will be awful (considering what people say about EBS performance in general without additional layers of complexity).
If I'm wrong from the start, then what would you suggest. I know that I can serve the site from one server, and just have the exact backup on the second server, but I don't want to sync the changes between them (just don't have the experience). Of course if it's much better, I'll try it.
Answer: Why not to Put Web server behind Load Balancer..

Load Balancer ( Haproxy or Nginx )
Web1 and Web2  ( Behind Haproxy)
EBS i/o is slow , you can try NFS or GlusterFS.


Increase captcha threshold for post editing

Question: It's a very common behavior to refine answers several times after submitting them. Most of the time, the refinement is just adding and removing several characters or words. You might notice some other issues right after the edit. It's pretty common to face a CAPTCHA. The current threshold is a little unacceptable (specially for slow connections).
Comment: It seems a lot of people "forgot" what is the purpose of the captcha -- it is not to annoy people, but to check if the user is human. Constantly checking if user is human is an absurd -- instead of solving the problem, SE created one.
Comment: catpcha are unacceptable like they are now..
Answer: I have several possible solutions:

Take the edit magnitude (the number of characters edited) into account. Don't ask for a captcha for a number of small edits.
Just increase the threshold.
Take the rep into account. Either use a step-function to reduce captchas after a specific rep or decrease captcha count as the rep goes high. However, if you chose this route, you should make sure there's a maximum limit so that if a high-rep account is hijacked, not much harm can be done.
Remove that stupid image. It's a pain to wait for it to load on slow and high latency connections like mine.
Comment: +1 for suggestion of image removal; see also http://meta.stackexchange.com/questions/58917/best-way-to-minimize-captcha-interruption
Answer: Just as another example of why this is sometimes required: in cases where the preview doesn't quite match the posted version (e.g. for links or code formatting) it can be a bit of a trial-and-error process. CAPTCHA makes it that bit more tedious.
Comment: That's a good point. Sometimes the preview pane gets it wrong and it takes you a few goes to find what the issue is.
Answer: Some reductions in CAPTCHA throttle thresholds, if you have > 10k rep:

for edits -- reduced by two-thirds
for post submission times -- min seconds reduced by one half, max minutes increased by 2x

additionally: assuming you are a logged in user and have >= 200 reputation, after successfully completing one captcha we now suppress captcha for 5 minutes on your account.
Comment: why is this problematic? Complete one and you don't have to complete another for 5 minutes minumum. Can you describe what you are doing in more detail?
Comment: You don't consider a captcha as frequently as every 5 minutes tedious? Try it for a while...
Comment: It's alright for some, you have more than 10k rep. Situation for the rest of us is dire. Stack Overflow admins are out of touch as to what this site is like to use for the majority of users.
Comment: I see Recaptchas after making several edits to an answer in quick succession or posting on a new Stack Exchange site. But the rate doesn't bother me so much as the difficulty http://meta.stackexchange.com/questions/75965/the-recaptcha-has-become-too-difficult-for-humans-to-solve
Answer: The limits should be much more relaxed, especially if the captcha has been recently hit. Currently it is extremely annoying. And relaxed limits at 10k rep, WTF is that? How about making them relaxed at 1k or so - high enough to discourage most spammers from building it up, I suppose...


Should this SE site include Technical Questions (IE Photoshop, etc)

Question: As Can Berk Güder pointed out, these questions might not be fit to the more specific approach of illustrating and building graphic designs, and more about the use of the applications. We both agreed that there wasn't really a more appropriate forum for this in StackExchange except for perhaps SuperUser. So should specific technical and procedural questions about the software be included here?
Answer: I was about to start another question when I saw yours. Anyway, here's what I wrote:

What should we do about questions regarding tools?
I wrote, when defining this site over at Area 51:

A site focused on graphic design, including icon/logo design, colors and typography. Questions regarding the tools of the trade (Photoshop, Illustrator, etc.) are also allowed, as long as they're relevant.

But we never really defined what should be considered "relevant."
This, unsurprisingly, is the first of the 7 essential meta questions of every beta, and the first question ever asked here was regarding a tool: Exporting layers in Photoshop.
I believe it's both impossible and unhealthy to forbid all questions regarding tools. There are thousands of questions regarding programming tools on Stack Overflow (over 26,000 questions tagged visual-studio* and over 7,000 tagged xcode*, for instance), and some of these are great questions.
However, all too often questions get closed with "belongs on superuser.com." So, where do we draw the line on this site? What gets closed as off-topic or "belongs to superuser.com" and what stays here?
My current opinion is that we should decide based on two factors:

Triviality
Relevance to graphic design

So if a question is too trivial (one example on Area 51 was "how do I export as GIF in PS CS5?") or is only circumstantially relevant (e.g. how do I uninstall Adobe Bridge?), it should get closed as off-topic or get migrated to SU.
If, however, it's not very trivial or is relevant to graphic design in general, it should be allowed to stay. (e.g. what's the easiest way to automatically add 960gs guides in PS CS5?)
Of course, this is just my two cents and not everybody has to agree.
Comment: "Trivial" is an entirely subjective term. What could be trivial to one person is someone else's last obstacle to completing a project on time.
Comment: I like yours better.
Comment: Well, trivial answers *could* technically be easily answered and then completed though.
Answer: Does anyone here remember wax machines? Thirty years ago they were a necessary evil in the graphic design department because the only other alternative was to use rubber cement or some other nasty glue to keep the layouts together. Wax machines were much more convenient.
Inevitably the question came up of how to replace the wax or the rollers in the wax machine. A technical or even trivial question, to be sure, but if a designer didn't know how to do it and they were the only one working, then production ground to a halt because they either had to go back to glue and a brush or simply stop working until someone came in who knew.
Photoshop, Illustrator, InDesign, Quark, and the rest of their ilk are the wax machines of today (and triangles, t-squares, X-acto knives, ...). Questions about their specific functionality may not necessarily fit with graphic design in general, like discussing color theory or grid layouts for a website, but in most cases graphic design does not get done in a reasonable manner without them.
Whether or not technical questions are allowed doesn't change the fact that people are going to ask them and they are going to do so A lot. Trying to close all of them will be a daunting if futile task, so creating a tag or set of tags to separate them out would probably be the easiest way to handle them. But closing them, to me, isn't the answer; closing questions is rarely the answer.
Comment: +1 for the old-skool metaphor
Answer: Picasso allegedly said something to effect that when art critics get together they talk about style and technique; when painters get together they talk about where you can get the best turpentine. Knowledge of tools is essential to good craftsmanship. Good craftsmanship is fundamental to effective design. Therefore (ot to get too syllogistic about it!) technical questions are on-topic.
If the purpose of site is to help designers design effectively, then questions about tools are certainly as important to most designers as questions of color theory, grids (which are really just a tool, albeit not a piece of software), et al. We all run into the occasional impasse, usually when we're right on top of some god-awful deadline, and it's the application rather than the color wheel that's killing us.
A completely trivial question would be one that can be answered simply by looking at the screen or clicking a first-level menu ("How do I save a file as a jpeg in Photoshop.") that even a rank beginner should know. But there have been some terrific questions so far that revolved around non-obvious application how-tos. We should not discourage those.
Answer: This question has come up in other SE sites, such as the photography site. The answer there has been to allow for all forms of questions related to photography, and if one wants to focus on other aspects, well, there's always tags to separate things out.
Comment: Can you advise if Photography would allow any Photoshop question at all?
Comment: They certainly allow for some photoshop questions, if the question is related to photography. If it were, say, designing a card with graphics, it wouldn't be allowed. There is definately a fine line though in these kinds of questions. Other photography specific tools are frequently the subject of questions. See http://photo.stackexchange.com/questions/tagged/photoshop
Answer: I don't have a simple answer, but I think there's a substantial risk that tools questions will swamp the rest. It could be argued that that as soon as you're asking about the minutiae of a particular application, it's execution or production, rather than design.
Answer: I much agree with Philip Regan.
Also, I think it's quite random to consider that a designer working in a site's design is not actually designing. The effort is similar, and creativity must show. Why would be less important to know how to correctly export web graphics, as is indeed an important part in a web designer's work, and an essential part in the workflow to publish his/her design? Would not be just as unimportant a detail about grids, lineature, CMYK or bleeding? Is not that also "instrumental"? Is it because is more related to editorial design? Actually, I voted for this site, and added my paragraph to support it, told people, etc, as was thinking it'd have a bit wider scope. I am hoping it is not all just about design theory, creativity, or only design for print. One could argue that graphic design is more related to all that, but then, reading many of the voting people in its day, a lot of them thought like me that questions about certain matters would be allowed. Many of the voting ones were programmers wanting to know a bit more what they need to in the areas that touch their activity. So those will be left out, in a big way. I don't know if that would be fair.
Considering the every day work of many designers (web or not) deals with a ton of technical issues, imho a site of questions and answers to solve a huge problem that got in the middle of your project at mid morning, is more than useful if the site covers as well a wider range of issues that actually appear to the designer too often.
All that said, I am ok if this place is going to be more about those traditional concepts mostly. Then perhaps (perhaps not) might be my bad in how I understood it. I work as a designer, but mostly web designer, and perhaps this place would be less suited for people of my profile.
However, it's a very nice place, great that it reached finally the beta stage!
Comment: I never thought that this should be a theory-only or print-only site. I'm a programmer myself, and the #1 reason I proposed this site was so that I could improve my design skills and do (at least some of) my own designs. That being said, if the site doesn't attract professional designers, it's no use to anyone. All forms of graphic design (web, print, etc.) should be allowed, and some "tool" questions are bound to be asked. It's just that I think we shouldn't let the site become a huge Photoshop tutorial.
Comment: @Can: I agree in so far that I don't want the website to become one giant Photoshop tutorial either; I loathe seeing yet another "how do I do this funky thing with iTunes/jailbroken iPhone" question on Apple.SE. But since there's nothing to really stop that from happening, the questions are typically asked by people new to the site and wouldn't have taken the time to get a feel for it, it would be best for the community to find a way to manage those questions. It's not the problem itself, but rather how we react to those problems that I'm finding determines the character of these sites.


Cannot 301 redirect with IIS URL Rewrite Module

Question: I am trying to troubleshoot my issue with the URL Rewrite Module on IIS 7.
I migrated a Wordpress blog over to BlogEngine.net. There were only about 5 entries that I wanted to use 301 redirects to the new blog, so I wanted to simply create 5 exact match redirect rules using the rewrite module. For some reason the exact match rule never seems to take effect, I always get a 404 error when the original url is navigated to.
I verified that my exact match pattern matched the existing backlinks and it does. I then tried a simple test and got the same behavior, no redirection. I created a page, test.html, on my site, I then created a second page, test2.html. So my exact match pattern is:
"http://www.mydomain.com/test.html"
And the rule is supposed to do a 301 redirect to "http://www.mydomain.com/test2.html
"
The redirect never happens.
I created the steps for the rule based on the instructions in this page:
http://learn.iis.net/page.aspx/461/creating-rewrite-rules-for-the-url-rewrite-module/
I don't see that I left out a step. After I apply the rule I've even gone as far as doing an IISReset to make sure it would be in effect but still no luck.
Any thoughts on what I might have left out?
(Note: my rewrite rules dont include the " " around them but I had to add since serverfault thinks I am trying to spam the system with multiple urls.)
Answer: The patterns are relative to the root of the site, not including the domain name, so in this case, the pattern should be:
<code>^test\.html
</code>
This will match http://example.com/test.html and then apply the rules you have set for it.


Do I ask here or on Super User?

Question: I visit Super User now and again, and I get amazed by the amount of Unix & Linux Questions asked there. Seems like many don't know of the existence of this site (or they simply resist?). This worries me because we may be missing some juicy Q&A, and that leaves one to decide which of the sites to focus on. This is sub-optimal, so I'd like to hear other's thoughts?
Comment: Ask here ofc!!!
Answer: My rule of thumb recently has been, ask here first. If I don't get a good response then cross post to SuperUser or ServerFault. I understand that by doing this it might take me a longer time to get an answer, but doing so helps Unix.SE grow and keeps it full of fresh content. I feel that's worth taking a possible hit on visibility so to speak.
In response to the question "The real question is why Unix.SE is a separate site!" which Gilles posed, I counter that far too many people avoid SuperUser because they feel it is a "dumping ground" for questions from StackOverflow or ServerFault which are not programming / sysadmin related. Many people I respect have told me that they flat-out ignore SuperUser. As Unix.SE has grown it has avoided such preconceptions.
Comment: This is offtopic regarding the Answer, but I wanted to mention that [unix.SE vitals](http://area51.stackexchange.com/proposals/3924/unix-linux) are healthy enough for it to launch. I actually thought the reason for the delay is because the designer is busy with the other *more-ready* sites.
Comment: Oh, that's great news! I've been too busy to answer/ask much recently but I've been voting like crazy :-)
Comment: Advising cross-posting is not a good idea, should be "flag for migration" instead.
Comment: @Mat: I know it's against Stack Exchange policy and frowned upon by most. I still say if it's done very carefully it can work, and I personally think that's why it's so frowned upon: most people don't do it carefully. If you *must* do it, make sure that you keep both questions updated -- when one gets a correct answer, post it on the other and link them together. Don't leave one open and one answered. But you're right Mat, **the official stance is that cross posting is bad and users should flag for migration instead.**
Comment: If there is a scope clash between two or more stackexchange sites, then it's only a matter of time until those sites receive the same question. One way to we could solve this would be to flag one question for moderation attention and ask a mod to lock the question and put a notice up, which points to the other question. This ensures that there is only one active, unlocked, canonical question.
Answer: I just had a question closed on SuperUser for posting it here. I talked to the mod responsible (slhck) and he pointed me to a discussion on meta.SO that apparently states the official Stack Exchange position.
To make a long story short, cross posting is frowned upon.
Comment: It depends. Sometimes moder is so much sillier. But such is life. It can't wait not to ban. Whereas an article could be nicely written with all emphasis in order to put the question into your head lean. And it passes links off a crossposting, long exposition as unclearness, and surely sort as ambiguous rhetorical.. (you know)
Answer: Unix questions are on-topic on Super User. This site is in beta, which will put some people off. This site is a lot younger so has a lot less visibility — many people will find SU from word of mouth or Google searches, and won't have heard of Unix.SE. So why wouldn't people ask unix questions on SU?
The real question is why Unix.SE is a separate site!

Do I ask here or on Super User?