« first day (756 days earlier)      last day (3244 days later) » 

1:04 PM
Thanks for your help Charles. I was in fact missing the closing paren (how embarrassing), however, the compilation error persisted. Having found that my second snippet was the correct method, I dug a little deeper. It turns out that the issue was something that I didn't mention in my question. The two lists contain two different Types. The AccountPayment is a different class than the Payment class. Kind of silly of me. Again, thanks for your code review and pointing me in the right direction. — Stuart Miller just now
 
@QPaysTaxes Because believe it or not, some people are friendly.
2
 
@QPaysTaxes Unlikely != Impossible
@QPaysTaxes Wrong room.
This is the nice people room.
2
@QPaysTaxes @rolfl
 
room topic changed to The 2nd Monitor: General discussion about Code Review -> codereview.stackexchange.com [addicted-to-cr] [ignore-the-trolls] [just-saying-hi] [kick-the-trolls] [monkey-business] [my-code-is-compiling] [nice-people-room]
3
 
1:41 PM
Monking
 
Exceptions thrown because of an analyzer aren't propagated to the IDE. Everything is swallowed and functionality just dissapears
Now I have to debug something that crashes something and causes code fixes to not appear
 
Hey, everybody, this is the first time in about 4 weeks that I've gotten more than 9 hours of sleep! YAY
 
We have too many tags in this room...
 
That's okay.
 
It's starting to hide the star wall for me
 
1:49 PM
Yes, but we need people to know that we're a
 
@SimonAndréForsberg We could nuke a no longer interesting one, but that's not up to me.
We have them once in a while, but not often and not long.
 
room topic changed to The 2nd Monitor: General discussion about Code Review -> codereview.stackexchange.com [addicted-to-cr] [just-saying-hi] [kick-the-trolls] [monkey-business] [my-code-is-compiling] [nice-people-room]
 
YAY I CAN SEE MORE STARS
 
Just noticed that the tags are sorted automatically
 
@SimonAndréForsberg Is that a resolution thing? I have spare room under the star wall.
 
1:51 PM
I wanted to be next to each other...
 
@SimonAndréForsberg That would be nice indeed.
 
@Mast yes, and a browser zoom level thing. I tend to prefer bigger text than other people
This will do for now.
or remove (Ha! Like that's gonna happen!)
 
We'll have a planet-of-the-apes scenario if someone does that...
 
I lost the extension which darkens the SE chats, does anyone know the name?
It was something like SO-dark
 
We could also try to remove the tag and wait how it takes until he notices it ;)
 
1:55 PM
I have a pretty good feeling that it wouldn't take very long.
 
@EthanBierlein It won't change if you don't hit F5
 
Lol, I thought that was going to crash my browser or something
Which browser though?
 
@EthanBierlein Why?
 
So that I know which browsers are safe.
So I can accidentally hit it without freaking out.
Yes
 
@QPaysTaxes Wrong.
It's an often used shortcut in many, many things.
Including Windows, browsers, whatever.
Currently on FF in Ubuntu, F5 is a standard shortcut here as well.
@QPaysTaxes Use arrows
@QPaysTaxes Like I'm demonstrating.
@QPaysTaxes Helps to determine on what you're responding.
And exactly 2 shortcuts, so no.
Alt+F4 works as well ^^
 
2:05 PM
ME TOO
 
NO I'M IN A WARM LUSH LEAFY TREE-PLENTY ENVIRONMENT
 
Q, how's your Ruby going?
Close. Open in different IDE. Fix it. Save. Close. Open.
@QPaysTaxes Blank here.
 
2:24 PM
0
Q: How to get Data-List in Scientific notation while using np.column_stack?

Nachiself.iter_list [0, 1, 2, 3, 4, 5, 6, 7] self.res_norm [4.2998898132165939, 1.5914300761388767, 0.46131735233238585, 0.13910070319835446, 0.085836049309602896, 0.017817049360280245, 2.6181955759616027e-14, 1.1412259537515578e-15] self.bound_one [4.5999999999999996, 2.401502451746746, 2.24006070...

 
@CaptainObvious Nuke it
 
Is there a moderator or 3k user in the house?
 
Hmmm yeah?
 
Are you magic @rolfl? How did you know?
 
shhhh
 
2:28 PM
Oh, right, we must never speak of the monkey-magic...
 
I was reviewing codereview.stackexchange.com/questions/92171/… and black is insisting that this just a simulation. could you take a peak at it and tell me if I am mistaken or he is?
 
Well, I can take a peek at it, but I am not likely to choose sides
 
@hildred ohhh dear...
it looks like you met a pseudo-chameleon
eh well, ~food
 
I did.
@QPaysTaxes I did
@hildred - I wiped all the comments, it was not constructive (the debate itself)
As an aside, I will actually choose sides a little bit ;-)
 
Anything to tell me if I want to ignore him or improve or just leave would be appreciated. And what is a psudo ch...?
 
2:33 PM
@QPaysTaxes - let's stick with one thing at a time./
@hildred - I saw that question come thrugh, and I had to read it twice before I understood it.
Note that the user is emulating a whole operating system, not just a login
Things like PAM and so on would not exist.... in his reinventing-the-wheel scenario
 
(unless he reinvented PAM)
.... and wanted to create a basic login program in the vein of a basic operating system.
 
Aww thank you @QPaysTaxes
 
On code review, many questions are reinventing-the-wheel style.
Your answer is basically "don't reinvent the wheel", which I agree with, and consider it to be an answer, but I can also see how other people will say "dude's reinventing thr wheel, let him learn"
 
Begins voraciously eating @QPaysTaxes arms
I need warmth. Food makes energy. Energy provide warmth. But before eat. Hug.
 
2:37 PM
ok fine, why would you want to not learn from the mistakes we have made when reinvinting the wheel? what is a pseudo-chameleon?
 
Don't worry @QPaysTaxes, I still love you <3
 
Hang on, let me just kick @QPaysTaxes and @EthanBierlein ....
 
Even if I ate your arms.
 
Right, serious things befor eidle chatter
a chamaeleon question is one that changes colours after it's been answered
In other words, the nature of the question is different at different times.
This is not particularly a chamaeleon questions
As for not learning from previous security mistakes, I agree, people should learn from them.
 
0
Q: Intersection of subset between two lists of dicts?

A TI want to find the intersection of two lists of dicts. Note that equality—i.e.: what is to appear in the intersection—is given by which keys they must have equal. See the obj_equal_on function. def obj_equal_on(obj0, obj1, keys): for key in keys: if obj0.get(key, False) != obj1.get(...

 
2:40 PM
So should I delete my answer or rephrase or what?
 
xNo... I would not delete it.
I would say your answer is OK, and other answers are OK too
COnsider this question: "I decided to build my own linked list..."
A review of the impolementation and an answer saying "use a trusted library" are both valid
That is the situation here.
 
@hildred Your answer actually brings up some good points.
 
@rolfl But, is it considered a code review? It's more a list of opinions, not a review.
 
Talk about inception
 
It is a code review.... Often, in a code review, saying: "why didnt you just use ABC library" is a valid answer.
 
2:42 PM
I added VSDiagnostics (NuGet) to VSDiagnostics (Project) and it showed me a warning to use an expression-bodied member in.. the expression-bodied member analyzer.
 
That is what I thought. I appreciate your help,. And since it is breakfast time, I'll check bak another day.
 
@rolfl Allright, I'll consider them as such from now onward.
 
@hildred OK, and, by the waym, there is a tag ... and, if that tag had been applied to this question, it would have made the situation more clear
 
@Mast What is a code review if not just a list of opinions?
2
 
@SimonAndréForsberg I suppose it should review the code, not the decisions made before writing the code.
Just the decisions made during the writing.
 
2:48 PM
0
Q: is this neat approach to find an item name starting or ending with from a list?

Sàn LuthraHi I have written this helper function, I want to know is their even better approach, considering I do not want to add dependency to any additional module ! def _isobjectInList(lst, name, criteria='startswith'): """ Find item in the list starting or ending with name passed. :param...

 
@Mast ummm? What exactly do you mean by that?
Maybe it is just me, but I make a lot of decisions while writing the code.
 
@SimonAndréForsberg The OP obviously decided to DIY.
So why does he get comments about that and not about his implementation?
 
I'm starting to write one thing, because that's what I thought I wanted, but then I realize to do it in another way, so I have to rewrite the code
@Mast I haven't read the question, but I assume it is because his implementation sucked
 
I'm not in the habit of downvoting answers, but I don't the answerer got the idea of why the OP did what he did. Saying "You're doing it wrong, let the pro's handle it" is not constructive IMHO.
@SimonAndréForsberg Every implementation would have sucked. That's kind of the point with style questions (although that tag was missing, it was obvious).
If I write my own Map it would suck as well.
If I write my own int, same thing
But that doesn't make it wrong to try
 
@Mast Exactly what answer are you not agreeing with?
 
2:53 PM
I mean, there's no point in either. It's just to get better at the language.
But that doesn't make it wrong to write it.
 
@Mast How would you even write your own int?
 
Nobody answers a with "Don't write FizzBuzz"
 
1 min ago, by Simon André Forsberg
@Mast Exactly what answer are you not agreeing with?
 
People might joke about it if you program it in , but even then, you'll get decent answers.
@SimonAndréForsberg The given answer. I think it should've answered the question instead of stating opinions about something different than the code written.
But hey, monkey says it's okay, so it's okay
 
@Mast that question has four answers...
 
2:56 PM
Oh
Now I understand your confusion
 
so... which of the answers is it?
 
1
A: Basic OS login program

hildred You are not using PAM. Pluggable authentication modules allows you to change authentication backends, which allows for different security for different needs. You are using passwords. Pet peeve of mine. Passwords have had security failures longer than they have been named. The problems with them...

The one just discussed
 
I see nothing wrong with that answer.
Pluggable authentication modules sounds like a really good suggestion
And it is good to know that passwords are tricky things to get right
 
It may or may not be sound advice, but it's not a code review IMHO
It's a design choice review at most
 
@Mast - questions are not allowed to ask for a design review
 
3:02 PM
But hey, in that case "Don't use C to build your server, use NodeJS instead" is also a valid review (not on this question, but you get the point)
 
Answers are free to give one anyway
 
If it makes a question off-topic, why doesn't it make an answer NAA?
Wouldn't that follow the same logic?
 
7
A: Locating matching files with input folder and file prefix

rolflThe problem is almost certainly this line here: t=$(echo $fn | perl -pe 's|.*?(\d+\.\d+)|\1|'); If you are invoking the Perl interpreter for each line, you will struggle. A close second is that, for each file, you invoke 2 subshells, and two other program (sed and echo). My recommendation is...

> My recommendation is for you to actually rewrite the whole thing in Perl...
0
A: Getting a set of subscribers from a subscriberMap

rolflUse your tools properly ;-) You are missing a bunch of functionality that is available on your class that would help you a lot. First up, you have the following: private final Map<Class<? extends Event>, Set<Subscriber<? extends Event>>> subscriberMap = new ConcurrentHashMap<>(); Now, that'...

^^^ Use the tools you have already, don't reinvent them
I answer like that often
Hell, even my comments answer..... is: don't use comments even if you get marked down for that
 
@rolfl At least you're mentioning the original code there. You actually reviewed.
 
Meh, as per the help center: Do I want feedback about any or all facets of the code?
 
3:09 PM
@rolfl There you explicitly solved parts of the given code. It's a better 1:1 implementation.
 
the design is one facet of the code.
recommending to reimplement the code in a different language "just because" is probably a bad answer, and will get voted down...
 
Just suggesting stuff which basically states 'Throw it away, do it all over with this' is different
 
but, if, for example, the question is about performance, and the user has written it in ... say.... LOLCODE, then implementing it in C would be better, and a valid answer.
A lot fdepends on question context.
also, a lot depends on whether the answer is a good one, or not, and whether it deserves to be flagged, upvoted, or downvoted.
 
I offer my dissent. LOLCODE is obviously vastly superior to C.
Because, reasons.
 
@rolfl That's a kind of extreme case
 
3:11 PM
@Mast intentionally
if the language is good enough to get the job done, and has a valid reason for being chosen, then answering with "use a different language" is a poor answer
 
What if the OP is restricted to the used language, should that be explicitly noted to prevent such answers?
 
Nope... language tags are generally well contained here.
C++/C recommendations often cross.... people write C++ code that's basically C,a nd the answers oftne say: just use C
 
If I ask how I could shorten a C++ FizzBuzz and somebody answers with a CodeGolf language, it would be a poor answer IMHO
 
Generally, answers in a different language are flagged low quality
 
Even though it does shorten the code considerably by picking a language designed to write short code
 
3:13 PM
but, you're not being sensible here.. you are pushing for extreme cases
 
@rolfl Well, you kind of opened the door on that one
 
in the case given, the user chose to implement a login system.
some people reviewed the code as it is, other people said: use a trusted library
both answers are valid
 
What if the purpose of writing that code (I think it is) is to learn how login systems work? Using a module won't teach him as much.
 
some have more value than others, and you can tell that by the voting pattern, and the accept marks
@Mast then the user should have tagged the question with .
also, Do I want feedback about any or all facets of the code? is a default option for all answers
 
"Any help on improving my code by getting rid of useless code or replacing it with better code would be greatly appreciated." There's no asking for improved safety or 'is it considered best practice'
 
3:16 PM
even if it is tagged with reinventing the wheel
> Do I want feedback about any or all facets of the code?
I have to go
 
Yes, it should have been tagged as re-inventing. I think it also should've been tagged as beginner though, seeing how he build up his code.
@rolfl Np, thanks for enlightening us
 
3:30 PM
I'd say that looks pretty good, however your question would be a better fit for Code Review, since your code is already working :) — Cu3PO42 6 secs ago
 
3:48 PM
Shhhh....
 
@EthanBierlein Too quiet for your taste?
 
Yeah, but that's okay.
 
@Mast I consider the "use a library" suggestion as "getting rid of useless code or replacing it with better code"
@rolfl As I have said on meta, that tag is rarely used when it can be...
 
4:07 PM
I agree...
Even when it is used, you can still answer that it's a bad idea
 
0
Q: Processing database data into multidimensional array, is this bad code?

James Heald// Structure of user_medication http://i.imgur.com/gTrZm7B.png public function getUserMedication($data, $success, $fail){ Permission::required(1, function() use($data, $success, $fail){ $user = $data["user"]; if(!$this->isUserUIDValid($user)){ ...

 
@rolfl which is one reason for why I think that the tag should be removed entirely...
 
I have a love/hate relationship with tags....
I give them the benefit of the doubt, though, mostly,.
 
tags in general, or some specific ones?
 
beginner, homework, reinventing, comparative are all tags that are fuzzy, but useful
Have to grab a bite to eat (socailize with the MIL (Mother in law))
 
4:20 PM
okay. Let's just hope you don't go MIA on us.
3
 
4:52 PM
Talking about MIA, where is everyone?
 
Don't know, but, here's a (treat?)
Weren't you watching terminator earlier?
Anyone want to help me out with something?
 
5:09 PM
Have you initialized Google api? This is how I do it async: codereview.stackexchange.com/questions/59678/…Dmitri Zaitsev 1 min ago
 
0
Q: JavaScript for monitoring (ie loading updates) to log files

MartinI wrote a simple little script, designed to load some log file. Clearing lines and loading updates is done by double clicking on the log line to clear. <html lang="en"> <head> <meta charset="utf-8"> <title>🌳🐞</title> <style> pre { margin: 0; } </style> <script>...

 

 The Cactus Game Engine

General discussion about Cactus: (github.com/ShearOfDoom/Cactu...
getting some message moving experience
 
5:56 PM
@EthanBierlein You may get more response if you state what we can help you with.
 
@Mast We have a room for this go to the above link that @SimonAndréForsberg linked
 
6:12 PM
51 mins ago, by Simon André Forsberg
I have 133 unread messages in that room. Was probably a good idea to make a new room for it
 
@SimonAndréForsberg We're kind of off-topic there now.
 
Hmm, yeah, now it seems to have deviated from the original topic.
 
What was that room for again?
 
I changed the room description, it should say.
 
"General discussion"
We can do that.
 
Zork
My BattleShip almost sets up as intended. I won't be able to build the whole thing before the deadline, but if I can make two bots shoot each other in the first version it's fine with me.
The current ship placement is still off though
[ 6, 5, 7, 5 ]
[ 1, 6, 2, 6, 3, 6, 4, 6, 5, 6, 6, 6, 7, 6 ]
[ 2, 4, 3, 4, 4, 4, 5, 4, 6, 4, 7, 4, 8, 4 ]
[ 8, 2, 9, 2, 10, 2, 11, 2, 12, 2 ]
[ 2, 4, 3, 4, 4, 4, 5, 4, 6, 4, 7, 4 ]
[ 2, 7, 3, 7, 4, 7, 5, 7, 6, 7, 7, 7 ]
[ 3, 4, 4, 4, 5, 4, 6, 4, 7, 4, 8, 4, 9, 4 ]
[ 0, 5, 1, 5, 2, 5, 3, 5, 4, 5 ]
[ 2, 5, 3, 5, 4, 5, 5, 5, 6, 5 ]
That's more ships than I ordered...
3
Also, the 4th ship should've been illegal...
The current grid is 10x10
There's no collision detection either, so it's kind of messy.
 
In a way I am finished with mine, I just haven't posted it for review
 
---
Shooting works fine though:
    [ [ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' ],
      [ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' ],
      [ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' ],
      [ ' ', ' ', ' ', ' ', 'H', ' ', ' ', ' ', ' ', ' ' ],
      [ ' ', ' ', ' ', ' ', ' ', ' ', ' ', 'H', ' ', ' ' ],
      [ ' ', ' ', ' ', ' ', ' ', ' ', ' ', 'H', ' ', ' ' ],
      [ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' ],
      [ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' ],
 
0
Q: My C code that shows contents of a file

Koray TugayHere is my code: #include <unistd.h> #include <fcntl.h> #include <stdio.h> #include <errno.h> int main(int argc, char const *argv[]) { char fileName[20]; int fileFound = 0; // Get the filename from the user: int fileNameLength = read(0,fileName,19); // We need to get rid o...

 
6:33 PM
@SimonAndréForsberg Don't feel like it?
 
6:46 PM
Solved the illegal locations at least...
Now I need to get the number of ships straight. Async humor...
[ 0, 3, 1, 3, 2, 3, 3, 3, 4, 3, 5, 3 ]
[ 5, 2 ]
[ 0, 4, 1, 4, 2, 4, 3, 4, 4, 4 ]
[ 6, 3, 6, 4, 6, 5, 6, 6, 6, 7, 6, 8, 6, 9 ]
[ 6, 2, 5, 2, 4, 2, 3, 2 ]
[ 8, 5, 8, 6, 8, 7, 8, 8, 8, 9 ]
[ 1, 1, 1, 2, 1, 3, 1, 4, 1, 5 ]
[ 1, 3, 2, 3, 3, 3, 4, 3 ]
[ 0, 7, 1, 7, 2, 7 ]
 
6:57 PM
In this question, the OP editted their code based on a recommendation from a comment. Is this allowed because the recommendation was not in an answer?
 
0
Q: PHP function to create a Hex dump

Ismael MiguelI was needing to provide the hex-dump of a code, but I needed to create my own. And, for fun, I decided to do it. function hex_dump( $value ) { $start_time = microtime(true); switch( gettype( $value ) ) { case 'string': $lines = array_map( f...

 
@SirPython Edits may not invalidate answers. If there were no answers yet, it's usually allowed.
If an answer appears shortly after the edit takes place and assumes the question was in its old state and now the answer is invalidated, it should be rolled back.
 
I guess it's okay; it was editted 20 minutes ago, and it got an answer 10 minutes ago.
 
As long as the answer isn't invalidated, it's ok.
 
Yup, it's good; nothing was invalidated.
 
7:10 PM
@Mast got too many other things on my mind.
 
@SimonAndréForsberg I know the feeling, that's why mine isn't finished yet either.
 
0
Q: Google Foobar Challenge: Don't mind the map

Qiang ZhengI'm going through the Google Foobar challenges: Don't mind the map. The code failed in last two case - "Test 4 failed.Test 5 failed.", could anyone help to find the problems? Statement: Don't mind the map After the trauma of Dr. Boolean's lab, the rabbits are eager to get back to their normal l...

 
@Mast +1 oops, so I didn't get the concept of Codereview, sorry for that (I'm not a member of it) — RAnders00 19 secs ago
2
 
@CaptainObvious Broken code.
 
7:31 PM
0
Q: Standard way of shortening C++ function signatures

user2738698The templates always get really lengthy when I have certain vector and templated contained objects and the end just looks like a bunch of > > > > > > > that hardly helps discern boundaries sometimes, like this: std::vector< std::pair< std::string, std::set< std::string > > > Is there a standar...

 
7:56 PM
Seeing the Google Foobar challenges turn up here on Code Review is interesting: these are part of Google's hiring program and are not open to the general public.
2
There was another one here:
8
Q: Google Foobar Challenge: Save Beta Rabbit in Python

AndrewI'm going through the Google Foobar challenges and am currently on the first challenge of level three. I've come up with a working solution, however, it's not an acceptable solution because it runs out of time. How can I optimize it? Problem Statement Oh no! The mad Professor Boolean h...

They are written in a really (really!) long-winded style, which must be deliberate — I guess the idea is to test the ability of candidates to boil the problems down to their algorithmic kernel.
 
@GarethRees I wonder who will be more likely to be hired, those who post their code for review, or those who review it.
 
8:24 PM
depends on the review ;-)
 
Shhh...
 
8:46 PM
Also, note that if your code "is very verbose and hard to read" you're doing Python wrong - once you've fixed it, consider heading over to codereview.stackexchange.com for some feedback. — jonrsharpe 10 secs ago
 
@Duga I love it every time I see jonrsharpe make a comment on SO.
2
 
We gotta get him elected.
2
 
Anyway, I gave a hint to Qiang Zheng:
The method Subway.paths seems to assume that no meeting path can be longer than the number of lines. But what makes you think that is the case? It seems possible to me that there may be longer meeting paths that you are missing. — Gareth Rees 59 mins ago
 
1
Q: Calculate the running median

Nilzone-I'm trying to solve a challenge where you need to calculate the median every time you add a number. say you have a list of numbers: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 When you scan in the first number (1), you calculate the median of that. When you scan in the second number (2), you calculate the ...

 

« first day (756 days earlier)      last day (3244 days later) »