« first day (2582 days earlier)      last day (1233 days later) » 
00:00 - 18:0018:00 - 00:00

6:41 PM
What to do when users suggests edits to code, like here?
^ I'd like to add that this code that is added is the better way to do it.
One should check that objects are the same when doing a check for equality.
 
^^ how did that happen? url undefined
 
7:02 PM
my request seems to be repeated.. can an RO delete it?
 
7:12 PM
Am I the only one that cannot deal with title edits? I simply cannot read the two different titles when they's two titles in the same line.
 
@SurajRao it is appreciated if you link to the actual item you want us to remove. That prevents that we have to guess and by accident remove the wrong request.
 
7:39 PM
What to do with an edit that changes from British English to American English while also in-lining images? Like here?
 
@Scratte I edit-improved it and changed discoulored back again, as the title wasn't changed either and I remember we had a discussion about UK-US English to do so...
 
OK. So that was approved. Doesn't that show them that editing from British to American English is fine?
 
I rolled that back, so he got his +2 and the coherence is granted
 
Ahh.. but the discussion I believe is that changing from British to American English is a big no-no.
 
that's why I rolled it back
but the inline image was important (I think)
 
7:45 PM
Ohh.. does that mean they do not get the +2?
 
@Scratte No, they still would get the +2.
 
edit was approved by community, so yes they got +2
 
So, what's to learn from that?
I once got that kind of edit on one of my posts from a >2K editor. I ended up deleting my post.
But apart from that, does it mean those edits are to be approved then?
 
@Scratte I would have rejected that with a custom reason saying that we don't change posts between British and American English, unless the usage is not consistent throughout the post. I would then separately edit in changes to inline the images. This provides the user with an explicit reason why the edit was rejected, rather than just a "Reject and Edit", which just leaves the different edit without explanation.
 
@Scratte as the consensus in this room/Meta was not to change US to En and vice-versa BUT if some edit was useful, rollback the en-us part and use edit-improve (that's if you are >2k)
 
7:49 PM
@Makyen Ah. OK. That's what I was contemplating on doing. Rejecting it for that reason.
I see you noticed my reply and raised with a new sentence ;) It's almost like playing cards :)
 
@Makyen But, more importantly, is there a hat big enough to bridge the gap between galaxies?
 
There's a hat with a flag that can be placed on Makyen's home planet ;)
 
... and what happened with the userscript that modifies the mod-names font in chat? Now we have blue and italic for mod ROs but you have two diamonds.
 
Unless of course that would be giving out too much personal information :D
 
@Makyen isn't this the same as I did, just a bit harsher for the editor?, at the end, I rolled back the "grammar" thing (even removed that from the edit reason) and editor gets the credit for their effort?
 
7:56 PM
@Vickel I think the editor should not have been given the credit for their effort in this case. The edits made were 5 second ones, so unless I missed something, it wasn't a major investment on their part.
 
@Scratte Yes good point, you and Mayken are probably right
@Scratte I think I was in holiday mode
 
@AdrianMole That's a good question. It would have to be a really big hat.
 
@Makyen Is that actually the galaxy known as the Sombrero? I'm sure there is one.
 
@AdrianMole The additional diamond is an overall change to chat. That change is currently causing problems for displaying some usernames, so I expect it to change. I'll adapt the userscripts once the change is stable.
 
@Vickel Heh.. fair enough :) I noticed you lost your previous cap.
 
8:02 PM
@AdrianMole Yes. :)
 
@Makyen It looks very beautiful, but I can't help to think that it's a dangerous place for life.
 
@Scratte yeah changed it as I found this new "secret" hat i'm wearing now
 
@Vickel You mean that tiny dot with propellers in the corner?
 
@Vickel We want the editor to not make such changes. They need to be informed of that in some way. Approving their edit basically communicates "this was good/fine". The user is relatively unlikely to even revisit the question, so they are unlikely to see that the edit was rolled back.
 
@Scratte Space is dangerous. Very dangerous. And there's a lot of it. So be careful!
 
8:05 PM
yikes, I scrolled too fast i.stack.imgur.com/UdS4W.png
 
@AdrianMole No, I mean if one was to live there, it would have be in a corner shielded from all that radiation.
Sort of like we are far from the center roughly in the middle of the plane of the galaxy.
 
@Scratte Much the same as in our own Milky Way galaxy. Not as extreme, perhaps, but the same general issues. Without all sorts of stuff shielding us from all sorts of other stuff, we'd all be fried.
 
@CodyGray While I agree that a typical "programmer" and maybe mature/old peeps taught.. like me. No doubt we suffer a lot young people arriving to SO used to only "like" finding their first question at -10.... I don't really have a solution but for sure it's a problem for the future to get people involved and maintain what has been build. It's much harder now to post your first question then what it was when you posted it.
 
I like fried - banana with cinnamon
 
@Scratte It depends on what you think is bad. There's certainly areas which will not be habitable, at least by life as we know it. However, there will also be large portions which should be fine.
 
8:08 PM
@Makyen yes, I understand. In case they would have edited something else substantial, my action would be correct?
 
@Makyen I trust you on that. Especially since I cannot rule out if you have experience :)
 
:)
@Vickel If their other changes substantially outweigh the changes between different styles of English, then "Improve Edit" is probably reasonable. I'm a bit biased towards rejecting these, because if they are not informed, then they will just keep making such changes, which creates a larger and larger issue.
 
With "Improve Edit," you can either add-to or replace the comment made by the original editor. But not sure how many would read that.
 
@AdrianMole That's worked for you? When using "Improve Edit", I've never found that any of my edits to the edit comment have ever stuck (i.e. they have always returned to exactly what the original editor used).
 
@AdrianMole that's what I did
 
8:19 PM
@Makyen Well, now that you mention it ... I never checked. I just assumed the change would stick.
 
Yeah, I'd also assumed that, but I've never had those changes stick on ones I've checked. Note: I mean change the edit comment for my edit, not their edit.
 
Is there no-one here who understands how the site actually works? xD
 
:(
 
... I'll need to experiment. I shall report back when I have something to report back.
 
Sounds good.
 
8:25 PM
@Makyen @AdrianMole if you look at the time line of the post we discussed, there states now comment: "embed image" and not the previous comment "Grammar and embed image"
 
What about the other edit I mentioned here. This was an improvement to the code, but it got rejected. I wanted to approve it, but I'm not sure of the policy.
 
@Vickel Hmmmm... now I'll have to experiment and/or re-look at some "Improve Edits" I've done.
 
@Scratte the consensus here is: "we don't mess with the answer, improving code. You can always write anew answer"
 
^ Or leave a comment suggesting that the OP improves it. (With or without a hint-ful downvote.)
 
@Vickel In that case it would mostly be plagiarizing the Answer, no?
Ok. Now we're on a roll, why is this minor edit Ok to be approved?
 
8:34 PM
@Scratte I don't think plagiarizing is the right word here. It's more an intervention with the author's intent
 
@Vickel Not sure about that. I think they just forgot to include it in this case. But I left a comment for them.
 
@Scratte Plagiarizing is when you implicitly or explicitly take credit for someone else's work, or don't give them credit for that work. The CC BY-SA license permits you to copy content out of other answers, as long as you give appropriate attribution/credit to the source.
 
@Makyen Fair enough. But I'm pretty sure I'd not copy someone else's code in it's entirety and repost it with 3 lines added at the top :)
 
@Scratte while it's java... and you understand it... the question is bad and all answers are bad who in the world would every implement equals like that... the subject is more complex... what is meant by equals, hashcode etc...
 
@Scratte Generally, we don't edit to convert between two different ways of representing the same thing in Markdown. This is similar to how we don't edit to convert between two different dialects of English.
While getting rid of the extra indentation (i.e. the indentation which was displayed within the code block) was OK (although I'm not sure it was worth a suggested edit), changing to using three backticks rather than a 4 space indent shouldn't have been done. I'd also note that doing so was more editing work than just highlighting the code and clicking the code button once in the editor.
 
8:45 PM
@PetterFriberg Nobody seemed to have touched on hashcode :)
@Makyen Thanks. So I guess my action wasn't wrong :)
 
@Scratte I would just delete it all.. but don't even know how to close it :)
 
@PetterFriberg It's a valid Question, no? How to implement equals on a object with three fields :)
@Vickel There was a development on the edited post that none of us noticed.. :O The image weren't inlined correctly.
 
@Scratte yeah, when I looked at the timeline earlier a noticed a new edit... confusing at a first glance :)
 
9:01 PM
also the our canonical on .equals is bad... but yeah a dupe is a dupe....
 
@PetterFriberg There's every opportunity for you to post an Answer on the target then :) You may even get a hat :)
Is the added formatting tag relevant here?
 
@Scratte naa I refuse to answer in java... too much mess for me...
@Scratte not sure but well I would have select NO
is a really bad tag... :)
 
@PetterFriberg OK. Thanks :)
 
9:17 PM
@Scratte anyway if you like to answer post and answer that use Apache Commons Lang EqualsBuilder and HashCodeBuilder function or something simile ;)
I bet you will get some points over time :)
 
@PetterFriberg Naah.. I generally use vanilla Java for posts unless they're already using a library :)
But I may check them out just for fun though :)
 
I got bouncer hat, but it still looks headless
 
@Dharman absolutely respectful, scary nearly
 
@Scratte For sure they need a descent answer, notify me if you answer I will check .... but you risk dv if you don't do it well :D
 
9:32 PM
lol! I think.. I have another project, I should do then :)
 
@Scratte don't be afraid of DV, think of all the UV you could get and...
 
I'm less afraid of downvotes than upvotes :)
 
Com'on you got a great challenges now... post a decent answer to a such important canonical... better then answering all the debug my loop questions :)
Personally I like solutions that somehow create a key.. and then equals and hashcode on that ;)
 
@PetterFriberg I remember an user that literally got 45k answering regex questions.
 
I'm confused. You say you have a better way and an idea about exactly how to do it. But you won't post it? :)
 
9:39 PM
@Braiam and in really short time, I remember too :)
 
Yep, that's why reputation is hardly a measure of competence.
 
same in java you can get that quickly by debuging loops.. throw in some jave8 and you will get 95K
 
something something lowest common something something popular something PHP
 
@PetterFriberg Half of my time is spent coming up with complex equivalence classes, defining hash and equals methods. Fun stuff.
 
@Braiam I do php Q, mainly one framework, first you need to find a Q which doesn't need to be closed
 
9:42 PM
@Vickel I didn't know you can close answers :D
 
^typo, looks like I got excited :)
 
@Scratte Oh, he was going to provide it in the comments but ran out of space... /s
2
 
I'm going to check out that canonical every day until I see a good Answer from @PetterFriberg :)
 
@Scratte Yeah I have mine... but refuse to post it, I get paid and SE refuse to pay me :D, these internet points do not buy food for my children :)... just joking but well personally I don't like the answers on that canonical... I would define a key that is a composite of properties that are key (normally the key is a string) and then do equals and hashcode on that... or use a library like commons... all that code is mess, hard to maintain (if you add properties), hard to read etc.
 
I'm even even sure what was meant by "somehow create a key". Unless that's some sort of String. Ahh. I see I wasn't completely of with key part :)
 
9:50 PM
Yeah exactly like you do with entities.. it's a String or a composite key
 
A String can be a concatenation of several attributes, no?
 
Note that depending on what you want to do, something nice and static like a string may not cut it. The example I run into all the time is a Pair class that represents combinations, where order does not matter.
 
exactly check this if you like to see how commons do it commons.apache.org/proper/commons-lang/apidocs/src-html/org/…
 
@code11 Can't you just make a rule for how to create the String?
 
@code11 sure exactly that the problem with equals... what does it mean.. an array need to contain same object or be in same order?
in java just parsing it as string would impose order...
 
9:53 PM
Sort of what you do when handling synchronization of letting the "lower id" get the first lock.
 
if equals then mean same object... well no need to override :), hence somehow asking the question you imply that equals means something else...
 
I think what's meant is what if you have an object that just holds the values of two dice. Die1 and Die2. Then you want 6 and 5 to be equal to 5 and 6.
 
That is what I meant, but scratte, you have a point, if there exists some ordering you can impose on the properties, in this example list by greatest to smallest, then the combo 5,6 ("6,5")== 6,5("6,5"). Maybe I've been complicating things!
 
Just order them by which is greatest or smallest. If they are equal it doesn't matter ;D
If you have arrays of dice then it's a bit more complicated.
 
10:07 PM
so the key is to define a key :)
and then do equals :)
 
That would be the vanilla Java way :)
The question is if code11 wants to get the 10K reputation points on that one great answer :)
 
who cares about rep... the question is if you like to have the pleasure that others will copy and past your code
 
@PetterFriberg That is a massive amount of code to implement equals :O
 
:), yeah.. so I would go for a simple string concat :)
 
It even uses reflection..
 
10:12 PM
null works great in strings... null_something_null always equals another null_something_null :)
 
Yes, because "null" is a String, not null :)
 
lol
unfortunately commons can't use that methods since toString() is not always the key... but in general it's a quick a solution ;)
 
The commons solution does a deep comparison as far as I can see. Which is why is uses reflection. It gains access to private fields.
 
Yeah they need to since a general solution...
if you have few primitive types I would go for quick string concat..
or even let the IDE generate a toString and then equals that...
 
I never thought of doing that before. It's a great idea instead of making a ton of comparisons.
 
10:29 PM
:)
Go go go get some internet points :)
 
I went looking for hashcodes now :)
 
do a method that does reflection on variables, string concat'em and return the value, then equals and hashcode that... vola'
if you call the method name getKey() I will consider the upvote :)
 
Why does it need reflection? It has access to all it's own variables, no? Except for field objects of course.
 
just to get more upvotes :)... make it abstract so every class can implement it :D
and don't forget the the StringBuilder .... _D
 
Ahh.. a reduced version of commons.apache.org's version?
It's your idea though, so per the license agreement, I'd have to link to this entire conversation in an Answer ;)
 
10:40 PM
I'm a bit jokiing... sure no need to make reflection on a simple class... but yeah you need a method that define the key... this can be a simple string concat or something else... then you you equals and hashcode...
for me the question is more conceptual hence how do you define the key...
aah @Scratte did you understand why it was negative in that java loop... I'm not sure I explained it well enough..
basically Integer.MAX +1 gives that negative value...
 
@PetterFriberg Ahh.. that post. I posted another comment on that because I didn't understand the output.
I had transcribed the code and while doing so, I had missed that the number was increased by i and not by 1.
So I expected Integer.MIN_VALUE but that's not what they said they got from the code :)
 
10:56 PM
anyway it was not worth an answer because the main problem was the mess in loop... hence only peeps like you actually are interested why it would return that exact value :)
 
Hehe.. it puzzled me. Also, they said it returned the same value every time, but that's impossible for different values of input in the code that they ran :) If I remember correctly it was closed too, no? The entire code was in an image, which is why I made an error when transcribing it :)
 
it's a bit sad that people don't care much more... then to fix the loop but that's the way it is...
yeah closed for sure... maybe even deleted... I cv those mostly since it will never be useful to someone else... it just mess up internet
 
It was useful to me. I learned to pay attention when transcribing code ;D
 
copy and past as everyone else ;)
 
It was in an image! :)
 
11:00 PM
ocr
:D
 
I'm my own faulty Optical Character Recognition device :)
 
11:16 PM
The top Answer uses the library you mentioned :)
 
Yeah that's much better
 
And.. the next one uses an id as a key. But.. I'm not sure I'd want that.
 
Just testing Sam's userscript...
 
but 11 upvotes on this.stripePattern == tiger.getStripePattern() , hmmm :D
when stripePattern is a string..
 
It gets even better.. :) The third one addresses the issues of the "instanceof" problem.
@PetterFriberg It will work sometimes.. sometimes not :) Depending on how the String came about :D
 
11:22 PM
lol
intern everything.. and your home free
 
Does that work? If you create it with new String("blah"), no intern() is going to help you.
The String will still be it's own object, no? With it's own space in heap. Only a copy will be made in the String pool, if I remember correctly.
 
@Scratte How did you get Mariachi?
 
@Scratte I think it does... if the new String is intern also
 
@PetterFriberg I think not.. but I can test it :)
@Dharman I do not know :) I've tried to work it out.. I thought it was when commenting on a post closed by others, but I think that wasn't it.
 
@Scratte I need to check documentation, but my memory tells me new String("blla").intern()==new String("blla").intern()
 
11:28 PM
Is that even valid Java code?
 
because java uses same memory position
@Scratte probably not just to give you an idea
 
It is :) boolean b = new String("blla").intern()==new String("blla").intern(); gives me true :)
 
or well yeah it was intern() returns String... so it works
@Scratte the thing is that java push it to same memory position... that's why it works
new String("bla").intern()=="bla" should work also
 
@PetterFriberg Yes. I tested. It does :)
 
it's java's amazing string pool
 
11:35 PM
I didn't realize that it pushes the location of the reference to the pool. I thought it just added a copy to the pool.
 
I think it check if it exists in pool if it does it uses that object... it's a way to keep memory low if you have tons of similar string
 
Yes, of course it doesn't create an identical one in the pool :)
 
00:00 - 18:0018:00 - 00:00

« first day (2582 days earlier)      last day (1233 days later) »