« first day (530 days earlier)      last day (3486 days later) » 

12:01 PM
@Pimgd Are you sure? Where? I've not run into a single problem with that.
 
does your IDE auto-correct that?
 
No. It wouldn't auto correct that.
 
then problems
 
But this is all exactly why I need to get those methods shoved back into some place where I can test them...
It's way to important not to be unit testing it.
 
aaand this one too
If IsDeclaration Then Exit Function
If there's a space on the end of that
 
12:04 PM
Allright, so trim all the things. No biggie.
 
Questions are so much slower here than SO
SO 20seconds max between each question...
 
answers can be slower too
 
I see more quality in answers here
 
because improving working code is easier than fixing broken code
 
@TheFailure Damn right you do. =;)-
 
12:08 PM
There are many excellent answers on SO too.
 
@Morwenn has a point. They get lost in the noise.
 
@Morwenn Maybe, but they are lost under the mountain of garbage.... noise ;)
 
@TheFailure That's true, but I think that there are at least as many good answers over there than here. Statistically, it's another problem though.
 
@Morwenn would it even be possible to clean up SO?
 
That's a neverending job. Always in progress.
 
12:11 PM
Nevermind
2
 
@rolfl you guys did awesome on the close reasons.
Did you hear that @200_success, @Jamal? You guys rock.
 
@TheFailure Don't hesitate to try to answer, if you are mistaken, someone will tell you, you'll learn something, fix your answer and repeat for infinite programming happiness
3
 
I love UDs definition of rm -rf /: Finest compression avaliable under UNIX/Linux! Unfortunatly, there is no decompressor avaliable.
 
@RubberDuck The programmers folk initiated it, and we all did stuff... but thanks ;-)
 
12:23 PM
You're welcome! We have great mods and you deserve some recognition now and again.
 
14
Q: Should answers to questions be in the same language?

EngieOPThis is in regards to Solving the Lazy Hobo Riddle. Is it acceptable to have answers that have code written in a different language than the OP's? The OP has since accepted an answer, but others are posting their own in Java and Haskell. Some answers are mostly just code, but others offer explan...

Does this mean use of pseudocode is no longer allowed?
 
No, it does not mean that.
 
can I transform my illegal language code into pseudo code then?
 
Context? There were two issues with the specific example cited in the meta question....
The first problem was that it was code in another language. The second problem is that it was not a review, just a code dump.
 
no posting in Brainfuck?
 
12:27 PM
Purely hypotetical...
I was a bit worried about the answers, you see.
I prefer stealing concepts from languages
 
If you answer is a review, and some code helps to flesh out the review, then I am not particularly fussed about what language is used.
If the code is a code dump, then it needs to be turned in to a review, and I will give some 'leniency' if the dump is at least in the same language as the OP.... but will still downvote, etc.
2
Jamal's answer has it essentially right:
 
Hmmmmmm
 
> As for that specific answer at least, it was also about showing off another piece of code, with no regards to the original code whatsoever. When you see an answer like this, and it's in the same language, then you can ask the answerer to explain how it relates to the original code. In the meantime, or just after a while, you can flag it as NAA, as we do not consider such answers valid code reviews.
 
@rolfl So if you go over each part and how it is improved and changed into your code dump that is fine?
 
Answers are not the place to (only) show how much smarter you are than the OP. Answers are the place to give the OP a direction on how to take their skills to the next level.
 
12:30 PM
Hmmmmmm
 
Hi @Vogel612. It is code I'm using, though I have changed the names, put in placeholders for the method bodies and put it all into one object with an entry point. I have to keep the revised names, but I could replace the omitted parts with comments instead of place-holders, and remove the entry point I added. Would that be preferable? — Lucas 23 mins ago
 
replace code with comments?
no
remove code?
... no?
 
A code dump saying: "this is how I would do it", without any explanation of why that way is better, then it is not reviewing anyones code.
5
 
@Vogel612 It's basically saying "what if my comments were more descriptive and I removed some code"?
 
I think you are missing things here.... this is not as complicated as it sounds.
 
12:32 PM
@Pimgd there was no comments...
 
Paste into eclipse ctrl-a ctrl-/ and pase into answer (Replacing code with comments ;) )
 
0
Q: Linq to SQL ('select * from table').Count() vs ("select column from table").Count()

irvgkI am writing some linq queries where I came across following scenario: I want to fetch records from DB using Linq bases on some filter Here I want to take all record count also, so I did like below var queryData = pageContext.ExecuteQuery<MYVIEW>("select * from MYVIEW where {condition} "...

 
just doSomethingToAB() and similar
 
........ Feel like my answers do that....
 
wait, what are we talking about?
 
12:35 PM
"A code dump saying: "this is how I would do it", without any explanation of why that way is better, then it is not reviewing anyones code."
 
the scala type question thingy I VTC'd as pseudocode...
 
I see that... hey @Donald.McLean - does this question make sense to you? codereview.stackexchange.com/q/66852/31503
 
@TheFailure see some old answers of mine that look similar to yours... sec...
 
want me to invite OP to chat??
 
@Pimgd This was going to be my answer to the question put on hold
 
12:37 PM
HashSet<String> uniquewords = new HashSet<String>();
 
8
A: Square grid collision detection

PimgdNaming s is a poor name for a boolean array. I have no idea what s stands for. How about surroundingTiles? Array ordering Additionally, the order of the tiles seems strange to me. It's ... bottom, right, top, left, bottom right, top right, top left, bottom left. Without the image, I don't thin...

That one has something like what you do in it
 
this should be Set<String> uniquewords = new HashSet<>();
 
^^ should be:
 
Whoops :(
 
Set<String> uniquewords = new TreeSet<>();
 
12:38 PM
@rolfl why a TreeSet
 
then skip the sort ;-)
@Vogel612 Let me be the one ;-)
 
2 days ago, by rolfl
@Vogel612 Being an old geezer does have some advantages.
2
I'll just leave this here...
 
Set<String> uniqueWords = words.stream().distinct().collect(Collectors.toSet());
 
Gah, I give up on answering that....
 
@TheFailure why that? all else equal this answer is really very nice...
 
12:41 PM
Hey @Lucas welcome to the 2nd
 
rolfl hi
 
aside from the fact, that the question is closed, nothing should hold you from answering ....
 
@TheFailure I recall reading something about a contest of sorts
There was some code, and the challenge was to make it run as fast as possible on a given machine.
 
@Lucas There's been some concerns raised about your question.... but I don't know Scala, and there's maybe something I am missing
 
So there were some people who came with algorithmic improvements...
 
12:43 PM
You are aware I hope that saying Scala will summon someone, right?
 
and then some with line-level optimizations, and voila, it was 10x faster
But then someone built it a different programming language and it was even 5x faster
 
I have to say though, that in general, when we see classes called A, AA, AAA and B and so on, it raises eyebrows.
4
 
improvements were added on that for a bonus factor...
 
@skiwi Usually he should come around now..
 
Then someone rewrote the thing in assembly
 
12:44 PM
yeah, I can understand why that is
 
and later for the specific chipset
 
There's also the concern that the code does not do what it's supposed to do.
 
And in total they got it to like 1000x faster.
 
Based on what I can see in your description, you're saying: The code works, using a hack, but there must be a better way?
 
@TheFailure You can't require yourself to provide an answer that makes it 1000x faster.
 
12:45 PM
that's right
 
What you can do is the boy scout rule:
Leave it cleaner than you found it.
 
@Lucas OK, I see that the community ha closed your question...
 
Find some improvement and post that as an answer.
 
But, not all is lost.
The issue with the A, AA... type classes is that often meaning behind those names are more important than the classes themselves.
Even if you have to 'sanitize' the code so that it's not giving away information from work, or whatever, you should use names and concepts that are similar to what you need.
 
ok, yes
that's why the names are changed
I chose A and B for simplicity
but yes, I could do it differently
 
12:48 PM
@Pimgd Okay, I will try. It's worth seeing my achievement tab green :)
 
I posted a comment once about why context was some important but I can seem to find it so I'll have to reformulate it again
 
@Lucas As it stands, if I were to review that code, I would start off by saying: "Code should be self-documenting, names like A, AA, AAA are not helpful". Then people would upvote my answer, and you would get no benefit.
 
But basically: By providing context, you give us the power to give you a third option.
 
Back in 50 minutes, TTGTW
 
When you said "
There's also the concern that the code does not do what it's supposed to do." - who was saying that? I would like to know what they thought was wrong, as the reason for posting it was that I'm suspicious about whether it does the right thing
 
12:53 PM
^^^ that, in part, is me. We consider working code to be code that accomplishes the design objectives.....
 
ohhh we're deep in gray area now...
 
> The compiler does not recognise this, perhaps because I'm wrong about this and perhaps because it is not something it can deduce. To get around this I have told it to convert this to an S using asInstance, which is a faux-pas which I would like to avoid
Mostly because I am not a Scala person ;-)
which is why I asked Donald to have a look too:
 
yay found it
yesterday, by Pimgd
right now it's not possible to provide an answer that says "Not A, not B, but C."
 
19 mins ago, by rolfl
I see that... hey @Donald.McLean - does this question make sense to you? http://codereview.stackexchange.com/q/66852/31503
 
right now it's not possible to provide an answer that says "Not A, not B, but C."
Not without making a lot of assumptions.
Yet that's the exact answer you want.
At least I want those kinds of answers.
The ones where people present you with a new idea, not just pick one from a list you thought up before... because you had trouble picking between them in the first place, so anyone who picks an item on your list is gonna be met with "but won't that XYZ?"
2
 
12:56 PM
Donald toys around with some small systems measured in things like Astronomical Units, parsecs, light years, and dopler shifts. Petabytes, and so on... all in the Scala context.
 
@Pimgd well especially because that's a PoB poll question
"small systems" <-\-> light years, Petabytes
I sense a small discord in the force
 
you can measure small things in big units
 
@Lucas That's just begging for a dirty joke.
 
1 H atom ~ 10^-26 light years
 
@Lucas Yeah, Donald works with the data produced by the hubble and other space instrumentation
 
1:01 PM
0
A: Asynchronous SSLSTREAM

pasha_imranHi I am new here and the topic is very helpful to me But I need the method to send message to client back asynchronously. So can you please update a method that we can use to send message to client with ssl secure.

flag downvote delete?
 
@Aditya - you have just edited your question with 'working' output, but two of those outputs are wrong: this is in the output twice in Example 2, and fringilla is in the output twice in Example 3 — rolfl ♦ 1 min ago
Was this comment too complicated:
When I run this with the input "3\nThis this\nthis,this,this\nthis is done\n" it produces a result with this in the output twice — rolfl ♦ 3 hours ago
@Pimgd deleted.
 
@rolfl If given verbally to a co-worker, yes
But it's a comment online. It's re-readable and perfectly understandable.
However you might have forgotten to point out that the result is bad
 
@rolfl "This".equals("this") ~ false
not that you could do that anyways...
 
question got updated
does it work now?
it works I think
I'll edit the question
 
should be working, yea..
 
1:07 PM
yeah its working, hi btw
 
"This".contentEquals("this") ~ true
Hi @Aditya
 
would you people please review it and put it off hold?
 
@TheFailure get ready to post your answer
-1
Q: Arranging words in sentences alphabetically

AdityaFor an online contest whose problem is here, I wrote some code. In this problem the input will consist of a number of lines of English text consisting of the letters of the English alphabet, the punctuation marks ' (apostrophe), . (full stop), , (comma), ; (semicolon), : (colon) and white sp...

Voted to reopen
 
Any advice on why this question got no attention? It's been a day, no votes, comments, or answers. Not expecting anyone to answer, but it'd be nice to learn some lessons for next time.
 
@Aditya It will get reopened and you'll get answers. You shouldn't edit the code anymore now, since people will be basing their answers of the code as it is now.
 
1:11 PM
thanks
 
0
Q: Simple Django website with no authentication. For auth/testing tutorial -- Model, model-tests, urls.py, and settings.py only

aliteralmindI am writing a simple Django project which has no authentication at all. It's going to be used as the basis of a tutorial I'm writing, on the full authentication lifecycle (create account, login, change/reset password, delete account, etc.), where testing will be emphasized at every step. Beyond ...

oof
That's a biiiig question
 
Done and I made the improvements using a TreeSet
 
@aliteralmind if intval < MIN_BIRTH_YEAR or intval > MAX_BIRTH_YEAR:
 
@aliteralmind additionally to it being big there's not many guys around here...
 
if 1990 < 2000 or 1990 > 1900...
Oh dear.
 
1:16 PM
waaaait....
 
@Phrancis
 
@Vogel612 We used to keep them in chain, but one day the (takes off sunglasses), the djangos unchained
2
 
4 realz??
 
@Aditya So Arraylist are fine?
 
1:17 PM
@Pimgd Should be intval < MIN_BIRTH_YEAR or MAX_BIRTH_YEAR < intval
 
@aliteralmind nope.. should be AND to properly do what it seems to have been intended to do...
 
seriously i have no formal training for coding all i learnt is from net on my own and sorry i don't know HM
 
@Aditya there's quite a few guys around here with no formal training..
 
ME!
I meant arraylists
 
@Vogel612 If the value is less than the min or greater than the max. If it's out of range.
 
1:19 PM
Dan and Ducky, too
 
arraylist are superb
 
What about HashSet?
 
hang on
 
nope
 
@aliteralmind .. borked.. yes you're right.
 
1:20 PM
no hassets
 
@Vogel612 :)
 
btw. intval smells of generic systemic hungarian...
 
@Aditya It is a ArrayList that only allows "unique" elements in it
 
it's actually correct
I made a mistake =D
 
which is a double faux-pas...
 
1:21 PM
@Aditya But do you want me to write an answer that only uses ArrayLists?
 
if you are happy then that'd be great
 
@Aditya No problem :)
 
@Vogel612 the value parameter is initially a string. intval is the value after casting it to an int. Just to distinguish it.
intval = int(str(value).strip())
 
value isn't a name saying what it is...
 
I was a huge Hungarian notation buff, but I've been reformed.
2
 
1:23 PM
and I have no clue about python typing ....
TBH even I used hungarian notation in one of my projects...
UI_MethodName()
 
@Vogel612 True. Should be birth_year_str and birth_year_int. Hungarian in this one function isn't a bad idea, because of the cast.
 
@aliteralmind Doing Hungarian right!
It's a rare thing.
 
Wow. I've never been rubber ducked by someone else before :)
 
0
A: Simple Django website with no authentication. For auth/testing tutorial -- Model, model-tests, urls.py, and settings.py only

Pimgddef _validate_birth_year(value): """Validator for <link to UserProfile.birth_year>, ensuring the selected year is between <link to OLDEST_EVER_AGE> and <link to MAX_BIRTH_YEAR>, inclusive. Raises: ValidationError: When the selected year is invalid. ...

I don't know Django.
Did I use correct syntax?
 
@aliteralmind welcome to the 2nd monitor then ;)
 
1:29 PM
@Pimgd There's nothing particularly Django-y in that function, it's just doing something Django-y: validating the value of a model/database field. It's good advice. Thank you.
 
Yeah well I don't know python either
 
@rolfl Looking...
 
Nor VBA, but I seem to be doing well answering those questions as well today
 
@Pimgd neither do I, but my answers are still getting me upvotes...
 
@Vogel612 <dog meme - I have no idea what I'm doing>
 
1:31 PM
0
Q: Calculating from bit X to bit Y in JavaScript

Sleep Deprived BulbasaurI'm trying to solve a problem along the lines of You are given two integers, X and Y. Calculate the number of bits that will be changed in order to convert integer X to integer Y. Here is my solution (I believe it to be correct) function findNumberOfBits(x, y){ var bitCount = 0; v...

 
Okay I have some idea what I'm doing; applying English logic to code
or simplifying via mathematical proof
 
@Pimgd go ahead, we're not at 30 answers yet, and the SO correspondant has well over 50....
 
No I mean
 
Yowsa. That's one super special type definition.
 
@Aditya Done :)
 
1:33 PM
@Pimgd I know... but. Why not?
 
@aliteralmind thank goodness
 
@Vogel612 I'm too lazy to post it
 
ermph.. 4 answers on the meme post... meh...
nah I am satisfied with the honorable mention I got for German Overengineering
 
@Pimgd Thanks for the edit :)
 
@Vogel612 "Are you sure you wish to post a quinduplicate answer? You could use the edit link and improve your existing answers, instead."
 
1:36 PM
something like that....
dammit.. missing the â„¢
 
@TheFailure your answer to Aditya's question seems very good! See, you're able to review :p
 
@TopinFrassi Yeah, I actually like reviewing Java :) Just worried about mistakes
Ill get over it
 
@Malachi Right. Thanks for the tips. And for the answer @Pimgd
 
@aliteralmind feel free to become a regular ;)
 
@Pimgd Thanks again :)
 
1:40 PM
please do, really ;)
 
"As ArrayLists don't keep a natural order before you return you will have to call Collections.sort() which will order each string in alphabetical order"
 
@rolfl There's a syntax error in the code as posted. I left a comment.
 
 
@Pimgd the first part of it could be reformulated...
 
1:41 PM
but in essence is correct
 
nefkwbjf
 
ArrayList.get(int index) implies that they do have an order
 
I meant insert into a natural ordering of the type
Yeah
 
well they do, it's just not the "natural" order...
the sentence is completely correct, but misunderstandable
 
@Pimgd Thanks for catching that
@Pimgd Want me to edit it or are you?
 
1:42 PM
You should edit it, all I was doing was adding links to relevant documentation
Also FYI I am currently (when I'm not at work) playing Phoenix Wright Dual Destinies so yeaaaah
 
.........
 
I'm basically carefully examining stuff I hear or see for contradictions/lies/omissions
 
Do you have pictures bound to hotkeys?
 
No. I have Google Chrome.
2
New tab, type search string, hit enter, and then go to the images tab.
Google-fu means the first image is a good image you can use, click it, go to image, copy the url...
switch tabs to here and paste the url. The chat system then resolves the URL aaand you have an image in chat.
hmmm
throw new Objection
There's a good code pun here but I can't find the punchline.
 
NOOOOO
 
1:48 PM
@TheFailure confusion ensues
 
I don't like you @rolfl ;)
 
@rolfl Is that better
 
@Vogel612 He's having a breakdown, the witnesses always do that when you catch them multiple times... it's the defeat animation.
 
@TheFailure Was not my intention....
 
After that they start spewing hate and truth.
 
1:49 PM
@Pimgd I know how that works..
 
@rolfl here
 
@rolfl I was joking, I actually had fun answering that question :)
 
@Lucas - reopened, and thanks @Donald.
 
@rolfl What do you think I was missing from my answer?
 
@rolfl scan.useDelimiter(Pattern.compile("[\\s;:,.'\n]+", Pattern.MULTILINE));
What happens if it hits two delimiters in a row?
 
1:54 PM
There's the + on the []
 
ah I see
 
@rolfl ?
 
@TheFailure Honestly, I am not sure. It may be about the layout, and I don't offer the ArrayList option (which is not great for performance).
I also suspect it has a fair amount to do with the ♦
 
Posted an answer too
0
A: Arranging words in sentences alphabetically

Pimgd When the farmer's wife called Bob back in, the other farmers went back to their work as well. Your code doesn't come up with the correct solution for this. It splits "farmer's" into "farmer" and "s". That's not correct; it's one word. To handle this, you should add a special case for the '...

 
@rolfl I only did the ArrayList option because "i wished for simpler data types cause i know nothing much about them"
 
1:58 PM
@TheFailure See this: stackoverflow.com/a/26384368/1305253 ... I am a victim of this factor on SO ....
 
@rolfl "I also suspect it has a fair amount to do with the ♦"????
 
People see that I am a moderator, and they see the 41.9K, and assume more than they should.
 
Thanks for the advices @rolfl
 
np.
 
Meanie face :3
 
2:00 PM
Hmmm...... the zombie hoard is growing again codereview.stackexchange.com/unanswered
 
@Pimgd - I was uncertain of what to do with the ' ... you get a +1 for the suggestion for special handling, but I treat it as a delimiter.
 
@RubberDuck where question not asked this month?
 
IRL, I would run the code and see if it passed, and then adjusted otherwise.
 
@Pimgd Huh?
 
@RubberDuck SET PROTOCOL PseudoSQL; APPEND STATEMENT "WHERE question.askDate BEFORE NOW().month";
 
2:02 PM
@rolfl So things that i could do better would be: 1. Link the hell out of Java library. 2. Clearer wording. What else do you think? (Sorry if this is annoying but I want to improve)
 
Basically, of those zombies... how many are from before october?
cause often when I go through the list I see recent questions and I'm like "those will get answered normally"
 
@TheFailure Sound confident too: From what your task says I cannot specify your input method
Alright... really have to go now.
 
Confident phrasing is only for objective improvements though
"Braces must be placed like this" is a good way to get shot =D
2
On CR less than on SO, but still.
 
I didn't know how the information was being input....
 
@TheFailure "Oh dear! There's a lack of context! What to do?"
Option #1: Assume. "I'm assuming you use an X, if so, you can use Y to <improvement>."
 
2:07 PM
@Pimgd Oh. I'd have to write a query to find that.
 
Option #2: Ask. Post a comment "say, where's the input data coming from?"
Option #3: Ignore. Drop the point regarding the input... I don't recommend this, but if your answer is really big already, well... just leave it be.
 
Oh, so I did option 3 just then
Ok
 
Soooo now what
oh yeah right... work
Ehehehehe~
 
Work?
 
Some of us have these weird things called jobs
5
and we have to do work there
but I get distracted by... things
 
2:14 PM
Hahahaha
Its 12:15 am here ;)
@Aditya ?
 
0
Q: Network Communication Adapter

user56231Hi I'm produce a internet connection utility and below is the code I have used. Is there any better way of check for proxy and internet connection etc? /// <summary> /// Check the Internet connection using the url passed into it /// Network Adapter Check - TRUE /// Proxy Sett...

 
Is there an SE equivalent?
 
2:29 PM
user image
8
 
there is not...
hmm
time for a biology account
welp
0
Q: Where do birds go when it rains?

PimgdXKCD inspired... I was reading the comic and went "well, where do they go when it rains?" And then it turns out there's no answer on here. I imagine they hide in trees. But what if they're busy trekking to warmer lands? They can't just keep hiding until it's dry again, can they?

 
@Pimgd how did you tag?
 
@Vogel612 ?
 
I imagine there'd be some questions there... just out of pure interest..
 
@Vogel612 is
 
2:35 PM
yep.. next time I just go check the tag-synonyms beforehand...
 
=D now I just need to wait for hot question, I hope
 
@Pimgd lol
 
0
Q: how to use singleton and/or factory patterns in business logic layer

erkanerI understand the purpose of singleton and factory patterns, however I have doubts implementing it. My problem is that whenever I need to call a method from BLL, then I have create an instance of BLL class (please see the end of the code below). So, I am not sure if this is a proper singleton patt...

 
> Water/ice has a lot of weird phases. Maybe asking 'where do birds go when it rains' is like asking 'where does Clark Kent go whenever Superman shows up?'
 
2:46 PM
@Malachi Does Clark Kent hide in trees?
 
@Pimgd that is the hover text for that XKCD
 
Aww I knew that wouldn't be interpretted as witty
 
lol
Biology has a different review queue
they have one called "site self evaluation"
 
@Malachi well my birds question is a perfectly valid one
 
@Pimgd agreed, I upvoted
 
2:49 PM
It's out there, many other questions on other sites like it
Do I get a better answer on Biology.SE or on yahoo answers?
 
26
Q: How could dragons be explained without magic?

SheraffDragons are a grand classic of fantasy. For this question, let's assume we're talking about the following stereotype: hatches from an ostrich-sized egg and can grow to mountain size if nothing limits it's growth (enough food and space) lizard-like appearance, bat like wings, able to fly breathe...

 
@rolfl I don't understand type theory in Scala well enough to answer it.
 
@CaptainObvious should I really answer that one....
 
@Malachi I made an account on worldbuilding a while ago, simply because it has so much good questions
4
 
Well I did it, but,......
 
2:52 PM
@Pimgd I agree
 
12
Q: Do white Australians have a distinct look?

Sonny OrdellBackground I've heard from many people working in tourism or similar industries that, white Australians can be recognized as Australian solely by their facial features. Being Australian myself I've heard variants of the claim quite often and lean towards the claim being at least, a possibility. ...

 

« first day (530 days earlier)      last day (3486 days later) »