« first day (807 days earlier)      last day (3506 days later) » 

11:13
@nhgrif Suggestion for a commandment: "Tell, don't ask". This is related to Dependency Injection and other things, and is essentially the approach to get rid of that bloody singleton pattern. I've mentioned the concept of "Tell, don't ask" a couple of times in my CR answers.
@SimonAndréForsberg Elaborate please
Also, congrats on your win, I wasn't following as closely as I wanted to
Thanks
You should tell a function what it needs to know in order to do it's job, the method should not ask the outside world about this information.
(at least not ask "too much outside")
@SimonAndréForsberg That's an interesting way to look at it
I always thought about it as "Have the function only ask directly what it needs, and don't ask for something that will allow you to get what you need"
5
A: Getting and setting a static variable

Simon André ForsbergUsing a static variable will have the same effect as using a singleton! Imagine if you had two instances of ProductsCache: var a: ProductsCache = new ProductsCache(); var b: ProductsCache = new ProductsCache(); a.products = someArrayCollection; b.products = anotherArrayCollection; Now, becaus...

@MadaraUchiha I can agree with that. Ask directly what it needs: this.specialNumber asking for something that will allow you to get what you need: this.specialObject.getSpecialSomething().getSpecialNumber()
Right
Service locators (or their uglier bigger cousin, Singleton) are things you place to get other things
11:18
15 results for me saying "tell don't ask": codereview.stackexchange.com/…
Original article I read about Tell, don't ask: pragprog.com/articles/tell-dont-ask
2
Simon, thanks for the comment. The Tell, don't ask principle, it actually makes sense, never thought about it before. It will certainly improve my future code — Wayne Links Feb 14 '14 at 22:07
boolean isUserMyFriend = (relationshipInfo != null && relationshipInfo.getSource() == SOURCE_FRIEND);
Law of Demeter, anyone?
relationshipInfo.isMyFriend() FTW
Greetings
How's the Quality Index today?
11:35
what quality index?
The non-existing that should exist to indicate the levels of bad questions that show up
Basically, a stupid way to ask "Plenty of bad question today?"
Read any good books bad questions lately?
I think question quality is doing OK today
So far I haven't read any question.
I think I should answer more
I think so too
(that you should answer more)
In other news:
1.2k flags, average handling time 0 days 0 hours 13 minutes 0 seconds
@rolfl ^^
But I have a tiny project incoming, besides what I'm doing on Memer.
Wow
1.2k?
11:47
1236 to be exact
the monthly stats
That's quite a [bleeping] lot
Is there any statistic for flags that 'expired'?
expired?
our weekly stats: 297 flags, average handling time 0 days 0 hours 5 minutes 0 seconds
@IsmaelMiguel there's no timing out here.
That's a really good amount of flags handled
the mods get to all flags and timeout is only after relatively long
so is just different because the volume there is so huge
11:50
@Vogel612 Well, it could be useful to have some place to check those flags
@IsmaelMiguel meh. it's some stat that doesn't help you as a user..
with an average handling time of less than 15 minutes, you really think we have any expired flags?
I don't know
I'm sure the mods and cm's have some stats about that, but there's no need for the public to know.
@SimonAndréForsberg Can you elaborate on "Tell, don't ask" and exactly how you apply it to programming? I'm trying to assure that the commandments have as few exceptions (or none at all) in my mind as possible.
11:51
a flag could escape
@Vogel612 I'm not talking to the public, but to the mods
Nobody is perfect
I dream about it, but I'm not
@nhgrif Did you read the chat messages that followed that, and also the article on pragprog.com/articles/tell-dont-ask ?
The moderators aren't either
A simple flag wouldn't change the stats and would go unnoticed
@IsmaelMiguel it's kinda hard to miss flags when there's a queue keeping track
(in my opinion)
think of it like the Suggested Edit queue for 2k users
(or 1k here)
they don't just drop edits, right?
11:53
What do you mean with "just drop edits"?
like you suggest flags go unnoticed..
there's no such thing as a "expired suggested edit"
that's as if you said there was a suggested edit going unnoticed
@SimonAndréForsberg but the principle's the same
both suggested edits and mod-flags have a queue
11:55
Well
On Stack Overflow, flags can age away without being handled, but we don't have that many flags around here, so our flags don't age away
There was one edit that was unnoticed for at least 1 hour
@SimonAndréForsberg Hmm. So... I'm confused about this one sort of.
@IsmaelMiguel 1 hour's not all that much, you know?
the mod-flags are not really a queue, more like an overview of all current pending flags. We can choose which ones we want to handle
11:56
I know
I personally don't check the review queues around here, because more often than not they're empty
And I know 1 hour isn't much, but I don't remember if it was actually 1 hour or more
soo... what point are you trying to make then?
That a distraction could happen
Nobody is a machine here
Except @Duga
That's not a point...
...or rather, that's the most awkward imaginable way of making that point...
2
11:58
@IsmaelMiguel @Jamal's editing speed is pretty evenly matched with one
And I don't think anyone was denying that.
I forgot the original point, with so much going back and forth
But anyway
TTQH
> Oh, nevermind. I forgot what I was talking about.
@IsmaelMiguel wow
@IsmaelMiguel Time To Quit Home? That's a new one.
12:00
@SimonAndréForsberg I was thinking the same thing :')
@SimonAndréForsberg While in general, I agree with "Tell, Don't Ask", I think... I also think it has too many exceptions and seems to only apply to OOP.
Maybe he meant Heroin? Time to quit heroin? That's be a good thing to do.
@JohnSnow this is not java. not every room is a broken as java..
@JohnSnow That really escalated quickly.
leave my clean and whole world in peace
12:02
Or maybe it doesn't necessarily have too many exceptions if you only apply it to OOP... but then you're only applying it to OOP... and if I wanted commandments that applied only to specific types of programming, I've got some others that I could've used.
I don't mind if you shatter all illusions in java :D
Perhaps...
Well, you never know. Quitting home isn't all that easy to do :P
@Vogel612 sorry
- Thou shalt remember asynchronous code does not run synchronously.
@nhgrif not sure it only applies to OOP though..
12:02
Tell, Don't Ask?
- Thou shall not talk about asynchronous programming with JohnSnow because you'll most likely confuse JohnSnow even more.
@nhgrif yep.
Well, in this chat it might be ok
Madara does JavaScript and I think he uses Tell, don't ask in there too...
@JohnSnow So, I guess we won't be talking about anything I'm working on then, because it's all asynchronous.
2
So, consider this though... I've been doing a lot of GPS programming lately. All of Apple's CoreLocation library pretty well deals with a CLLocation object.
12:04
But that OOP and asynch >_> never mind me
@Donald.McLean What'cha doin? :)
CLLocation contains a lot of information, and at the end of the day, it's just far easier to pass that around. But when I want to put a pin on the map? I need to get the CLLocation's coordinate property (a CLLocationCoordinate2D)
So following "Tell, Don't Ask", if I have a method that plots a start, mid, and end point on a map, I'd need to do this:
@JohnSnow At work I am the lone developer for a single-page web app written in Scala. It's used by the archive operators to manage incoming and outgoing data for the Hubble and Kepler space telescopes.
plot(start: startLocation.coordinate, mid: midLocation.coordinate, end: endLocation.coordinate)
Which is fine. I write my first method as taking CLLocationCoordinate2D.
But I make no qualms about writing a convenience wrapper that takes the CLLocation arguments and calls that method.
@Donald.McLean Ah, I see. Sounds fun, if you can understand Asynchronous programming :P
@nhgrif that is telling, not asking. All is fine with that code.
12:07
func plot(start: CLLocation, mid: CLLocation, end: CLLocation) {
    plot(start: start.coordinate, mid: mid.coordinate, end: end.coordinate)
}
^ that is asking for the coordinate property of the CLLocation objects I passed in.
At home I'm working on a log analysis tool.
but it's not going further "out". It's asking the CCLocation about it's coordinate. That's a property the CCLocation owns.
If I understood it correctly, the asking is if the function would ask for objects not passed to it.
pretty much yes ^^
@Donald.McLean That sounds fun too
Meanwhile I'm just trying to understand JavaScript :(
12:10
@JohnSnow, you should avoid discussions of the personal, opinion-based sort while offiicial site business (eg: OOP discussion) is happening; We have The Nth Monitor for that kinda conversation
Telling don't asking is not site-business really.
I guess this concept is just too vague for me to understand. I think I largely agree with in general, but I don't think I understand it solidly enough to pass it forward to others as a commandment.
It's a yo-yo ride where I think I get it and then someone says something and I think I don't get anything at all >_>
@Quill ok
- Thou shalt not rewrite without consultation. (totally stolen from here)
@JohnSnow I learned the basics of JavaScript more than 10 years ago. I'm still trying to understand JavaScript.
12:11
@SimonAndréForsberg perhaps, but nonetheless. just tryin to avoid that thing that happened
I still have no clue what this refers to in all JavaScript cases.
Maybe that's why people say such (to me) weird things when I want to know more about how JavaScript works
> "this is a boggart"
Well, I'm still on the up ride on this. I think I understand it but I bet someone's gonna change that soon :P
12:13
> If a function be advertised to return an error code in the event of difficulties, thou shalt check for that code, yea, even though the checks triple the size of thy code and produce aches in thy typing fingers, for if thou thinkest ``it cannot happen to me'', the gods shall surely punish thee for thy arrogance.
Someone on the Internet is writing Monty Python programming commandments.
> Thou shalt study thy libraries and strive not to reinvent them without cause, that thy code may be short and readable and thy days pleasant and productive.
Effective Java Item 47: Know and use your libraries
... okay, I got it, I just need to figure out how to word it...
but something about not doing your own datetime calculations...
12:28
0
Q: Is it okay to edit a question on CR which has been edited on SO?

LoufyloufThe question I refer to is this one. It has been cross-posted from StackOverflow, it hasn't received any review yet but it has been edited on SO but not on CR. The edits made (indentation correction) are minor and would only affect the comments on CR, but since no answer has been posted yet, it w...

12:55
-1
Q: Extracting data from a large text file, using Python

ChickleI have a large text file (>1GB), it would be crazy to go through all of it manually. Someone suggested Python - I am new to it but am stuck and need some help. There are 15 columns with different headings and I need to extract certain dates from it. How do i go about doing this? Thanks

Maybe you can transfert it to codereview.stackexchange.com ? — JFPicard 30 secs ago
Huh. Stack Overflow also has a tag. Maybe we should watch that like we watch the tag over there?
@nhgrif - does the check-mark on the beginner-tag answer meta.codereview.stackexchange.com/a/5760/31503 mean that you now agree that the beginner tag should stay, and has a use, or is there some subtlety that I am missing?
On a personal level, I don't, and never will agree. My feeling toward the tag is about the same as and .
I'm voting to close this question as off-topic because it belongs to codereview.stackexchange.com — Thomas 13 secs ago
13:10
@nhgrif seems to be a very opinion-based tag
skimming over the questions yields only tool-recommendations and no-code questions
@Duga Arrgh... I was hoping people would have stopped that by now.
also this tag seems to be in the process of being retagged from
@Vogel612 Drat, I was hoping to avoid a resurgence in the whole debate. - just a confirmation of the conclusion.
He's talking about on Stack Overflow.
@rolfl different tag?
13:12
right, missed that.
No one wants to discuss yesterday's shenanigans and it didn't need to be drummed back up.
13
Q: Synonym request: [source-code-quality] is just [code-quality]

durron597tl;dr: Can we have source-code-quality synonymed to code-quality please? Facts: code-quality 310 questions - Wiki: Code quality is a measure of how well a set of code balances qualities of maintainability, performance, and style. source-code-quality 36 questions - Wiki: Source Code ...

seems to have been a manual cleanup..
@nhgrif Don't tell me what I want.
I could add a feed, but I think that'd be overkill...
0
Q: Simplicity decider

CaridorcI was interested in the codegolf challange about simple text. The spec is: Write a function that from a text returns the non-common words. I assumed non clean input so I cleaned it before proceding. The 'foo' 'barz' list is for easier testing, you may uncomment the line to read from a file...

13:14
@Vogel612 That'd be a better pun of '[code-quality] is the source of [source-code-quality]'.
Then don't cause trouble. So let me correct... you seem to be the only one still interested.
that's more accurate.
"seem to be" being operative. I am just the one that's most vocal.
the beginner thing was not cleared yet??
Question migrated:
1
Q: Initial code practice

AltiusI have few confusions about to write code (Java) - what I need to follow - Below is my code - Based on the following code, I need some clarifications - import java.util.Scanner; public class NameAbbreviation { private static String fullName; private static Scanner nameInput; public NameAb...

@Vogel612 I just got confused when nhgrif accepted an answer that was so obviously different from his stated position on the tag. That's all. It appears he's accepted the answer despite it being the opposite, and he's still emphatically against it. The difference between his actions, and words needed clarification. That's all.
13:22
oh ...
@rolfl The accepted answer is the only one that actually admits that it's a meta tag and attempts to explain its existence in spite of its meta-ness, rather than trying to argue its non-metaness like everyone else still continues to do. It's the only answer with any value.
OK, well, I got some upvotes on it, so it has SOME value to SOME people.
As for the discussion about it being a meta tag, nobody claimed it wasn't.
3
in fact, I pointed you to a post which lumped it in with meta tags.
You are a curious person.
Again, spare your comments on your opinion of me. I spare you mine as much as I can.
@SimonAndréForsberg I got it to work using tampermonkey. the desktop notifications.
Over the past months, I've lost basically all respect for you.
13:34
I can tell
@Malachi great!
Wait, Am I really in the 2nd monitor or did I go back to High School? @_@
Sort of like high-school.
@rolfl @nhgrif Do I need to separate you two?
Simon-sensei :D
13:38
@SimonAndréForsberg Good question... thinking about it.
Not sure how I would do that though...
Any other going on? Seen something upvote worthy?
1
Q: High School Senior's project one (python)

JeffI am teaching a python class to some high school seniors. I was thinking of doing an "oracle" game where the computer would come up with a number, and the player would guess it. These are brand new coders, and I'll teach them what they need to know to get there, but is this a good first project? ...

@JohnSnow Seen my community ad? ;-)
@CaptainObvious ... speaking of High School...
13:39
user image
6
@rolfl No? :O
Oh, someone actually upvoted my community ad.... hehe.
I can't find it :(
@rolfl Yes, Yes I did!
Thanks :D
13:51
@rolfl dafuq?
4
@Vogel612 it is an attempt to create an example of something that fits the rules of the process, but is inappropriate..... so, as an exercise for readers: why is my community ad inappropriate (or is it OK)?
@rolfl soo.. this is basically test-trolling?
@Vogel612 In a sense, yes. I discussed it yesterday too.
because... this ad says absolutely nothing about .. whatever it should be about...
13:57
It is shameless, and intended to inspire conversation.
ermph.
And most of all, advertise monkey answers!
Or community-vote testing. So far community has voted fine, to keep bad ads off the main site
Technically, I see no real difference between me advertising my own profile page, or my own personal blog.
I wish I was advertiseworthy
14:00
@Vogel612 - I don't want Code Review ads to promote anyone's personal blog.... it does not fit with "community promotion" ... but, we have a candidate that has met the 6-vote threshold, and thus Code Review, as a community, is encouraging the promotion of personal blogs.... which is... odd, and uncomfortable.
why not just open a meta and say that?
instead you submit an obvious troll ad, which is basically... throwing a fit like a 6 year old.
that ... really helps us understand what you're trying to say...
Because he's used to being able to single-handedly dictate things, but he no longer has that power and hasn't fully adjusted yet
@nhgrif that doesn't really help with non-communication
and you're getting personal...
or rather too personal for my taste
rolfl has no qualms being personal toward me. He has done it nonstop since the elections ended. No one has a problem with his behavior toward me.
Greetings
A while ago, I meant TTQW, but my boss was coming too close, so, I blurted whatever came out
14:06
@nhgrif then flag it ...
@nhgrif How about noone has a 'behaviour' towards anyone?
don't throw a fit like a 6 year old, be grown up and say it.
0
Q: Creating and manipulating a variant number of bufferedImages for vision algorithm

easymoden00bSo i'm developing an algorithm that takes structured light patterns to determine 3d properties of objects. This class builds the structured light objects. It creates a buffered image, and based upon initialization parameters and the needed iteration step, manipulates the image to form a structu...

0
Q: What kind of community ads do we encourage as a community?

Mat's MugCommunity ads will eventually be enabled on this site (6-8 weeks I wager). The system works by community voting. Anyone from anywhere can come to our meta and post an ad for anything - it's our job to vote it up or down and decide if we want to see that ad displayed on our main site. What kind ...

@Mat'sMug prod rolfl with it, I don't mind promoting personal blogs when they serve the spirit of CR
14:16
@nhgrif Complaints don't belong in chat.
I'm not complaining.
@Malachi Stop complaining. Complaints don't belong in chat. </sarcasm>
6
where do complaints belong?
I'm only behaving by the standard to which even former moderators hold themselves accountable.
I have to disagree with you there, @Malachi.
BTW.Work ...
14:18
does it have to do with site business?
@Malachi sure it does, get over it
complaints are site business, just like off-/on-topic discussion is
as long as it's not a rant
and chat is a good step-stone for a meta
seems like it's a feud between 2 monkeys, flinging poo
not everything you might want to say is always perfectly ready for meta
2
Q: What kind of community ads do we encourage as a community?

Mat's MugCommunity ads will eventually be enabled on this site (6-8 weeks I wager). The system works by community voting. Anyone from anywhere can come to our meta and post an ad for anything - it's our job to vote it up or down and decide if we want to see that ad displayed on our main site. What kind ...

~cooldown period for me
14:22
I think we need to call off the ads this year
Until things calm down
Maybe next month
When things are more regularized
It was just too soon
If we're gonna put things on hold every time someone has a drama fit on the internet we might as well shut down :P
2
@IsmaelMiguel we don't even know when the ads will take effect
I don't think we need to call off the adds.
@IsmaelMiguel they're not on yet
By 'call off the ads', I mean to take down the post and start a new one some time later
14:25
that would only postpone the problem, not deal with it.
But would help
There's too much anger
I understand that rolfl is angry because he lost his moderator status
@IsmaelMiguel You're the first stating we graduated too soon. As in, really, we've all been looking forward to this for months.
I'm not!
@IsmaelMiguel You don't get it.
I'm saying the ads
14:26
He didn't re-elect himself for his own reasons, he didn't lose anything.
@IsmaelMiguel He stepped down voluntarily. He wanted to just be a regular again.
2
Oh
Sorry my stupidity then
I'm still in the opinion to call off the ads till next month
I don't think that's going to happen.
Probably won't
But look at the ads!
We don't postpone things just because there's a disagreement over things.
@IsmaelMiguel And look at this:
9 mins ago, by Stack Exchange
2
Q: What kind of community ads do we encourage as a community?

Mat's MugCommunity ads will eventually be enabled on this site (6-8 weeks I wager). The system works by community voting. Anyone from anywhere can come to our meta and post an ad for anything - it's our job to vote it up or down and decide if we want to see that ad displayed on our main site. What kind ...

14:29
The answer would be "The same quality as last 2 years"
But I'm not brave enough to write that on meta
Those ads won't be a problem.
And please note that flagging those ads are not going to help anyone.
The current candidates suck, perhaps except for the RubberDuck one since that is kind of a big thing on this site.
@Mast then write more candidates. And please post an answer to the Meta Question @Mat'sMug posted.
@SimonAndréForsberg I will never see those adds anyway, I think most forms of advertisement are bad.
I could have my wife take a look at it though, it's kind of part of her job description.
14:33
@Mat'sMug @ others - Would submitting an ad for a blog from a writer who's not affiliated with CR at all, and the blog as a pretty broad approach, for example Guillaume Laforge's blog about the Java & Groovy ecosystem, be OK?
@Phrancis If that's OK, beware of incoming XKCD ads.
2
Since you'll be basically opening the door for such.
And regardless of whether we want those, they will be upvoted heavily.
Because that's how populism works.
I think the ads should advertise Code Review. This year, they seem to be to self-promotion
We could post some of the proposed CR logos as advertisement.
Well, I think the difference between a topical technical blog and web comics loosely/occasionally related to technology is pretty distinctive
@IsmaelMiguel the point is, ads will be displayed on Code Review. And other sites will post ads for their own betas, like we did before
3
14:36
It's up to the community. we are having a discussion about how people should vote. This didn't start because I posted my ad. It started because someone isn't happy my ad crossed the threshold.
@nhgrif Hand your proof.
@Mat'sMug Oh, I though it was to promote Code Review
@IsmaelMiguel Have you read both metas?
@IsmaelMiguel You're not the first, no worries
@Mast Yes, I have
Do I remember what I read? Nope!
14:39
Neither do I, but it usually straightens out my pointers.
@nhgrif and why you that be about you? I made that thread because we're obviously having a chat discussion about community ads, from which I believe general posting guidelines would stem - and those belong on meta, not in chat.
Monking
Monking
Monking!
MONKING
14:42
oh gosh
Monking!!
Monking!!!
Of course, but everyone may not want to. Maybe some people in here would rather talk of something else, but with a big conversation also happening in the room, it is difficult.
hmm...
that didn't go so well..
@Vogel612 I already moved most of it :P
hey everyone!
Monking shuttle
15:27
@MadaraUchiha you also got some signal...
Correct me if wrong, but it more looks like the idea seems to be that random conversations and oneliners (baiting actual conversations) happen around here, and as soon as people actually get into a conversation (and share interesting stuff), they need to move out
also moving seems to be really borked..
@skiwi not really.
in Tests and stuff, 2 mins ago, by Madara Uchiha
If I've accidentally moved relevant messages, feel free to move them back
it's more like the conversation takes two transcript pages, and somewhere in between there's signal
I'm currently setting up some dev-ops stuff at work, trying to decide between gitolite and gerrit. Has anyone here had experience with code reviewing workflows in a professional environment?
15:28
If we only keep concrete signal around here (directly related to the site), then there's not much fun to be here anymore
Because meta discussions always seem to be harsh
@skiwi I see your point now. I believe now that that conversation should only have been moved if people were discussing site business.
@skiwi it's not about only concrete signal..
it's about the pure volume of "unrelated" related stuff
It's all interesting what you were talking about
but there was some site-business I wanted to kinda get done
and 280 messages is huge
New post: Does Not Work http://importblogkit.com/2015/07/does-not-work/
I think somewhere around the 100 message mark you should already consider moving it into a separate room
Take a look at it from the other side... There's 10 users here watching righ tnow, they might've been interested in the conversation, now you moved that conversation in order to do some business directly related to the site
Though...
15:32
@skiwi I agree with moving it, frankly
I can see reasons why site-related stuff should be done in the site-room
" Site Business always comes first"
because it simply takes up a lot of space and usually it's only 3-something users
Quote from sidebar
Looks like there's some meta chat here about chat I have missed. Are other side questions like the one I just asked considered off topic for here?
15:32
@shuttle87 If they get too big, they are.
Otherwise, no.
@DanPantry Seems like I disagree with that then
I think the status quo is that we both want this room for site business and programming related chatter
@skiwi that's a big assertion you're making there..
@Mast What is "too big"? And if it gets "too big" what do we do with it?
2 mins ago, by Vogel612
I think somewhere around the 100 message mark you should already consider moving it into a separate room
@shuttle87 too big is subjective and usually we move it or "call to order"
15:34
@Vogel612 Well, users aren't in here only to reply to site business stuff, so there must be another reason they're in here
@skiwi true, but users aren't jhere to see three people bashing each other and their shit managers for 300 messages either.
so there has to be some place between these two
@skiwi if they're interested, moving gives them a nice link to follow
@Vogel612 As an aside, it wasn't my shit manager.
it was a third party manager who made an offhanded comment in a meeting
(although this is semantics)
^ that ...
15:48
@Vogel612 I can see your point
But now this chat is dead, is that what we intend?
This chat is not dead. It is just doin gwhat it does best - waiting for business to arrive, or spawning other interesting conversation that evolves to the point where it grows up and moves out.
@rolfl That's exactly how I feel it is right now
This is just a time of day in which @Captain isn't doing much since there are no new questions.
They'll be back.
@SimonAndréForsberg I updated my Meta Answer

« first day (807 days earlier)      last day (3506 days later) »