« first day (1028 days earlier)      last day (2991 days later) » 

9:00 AM
Naruto answer; accepted non-selfie answer with 0 score: Checkboxes array to delete images
Ripe zombie; open question with answers, at least one answer having score 0, no answer having score > 0: Parallelizing an algorithm with OpenMP using a dynamic work queue
 
Also, ouch, that intended usage looks awful @Quill
 
Hey Dan, I have no idea wtf this is in my code:
5
Q: Chat.SE in Websockets

QuillThis is a script that accesses the SE impromptu APIs to receive the fkey, a variable need for connection to chatrooms, and uses it to build a websockets connection which is handled by Node.js. This is also available on GitHub. It requires your username and password in the ws.js file and looks l...

 
Give me a few, just doing a release to our testing environment
 
var j = request.jar();
Sure, no worries
0
A: TPL Dataflow BatchBlock with Batch Size & Timeout

NathanTo accomplish this in TPL Dataflow, I found this gem (copied below for posterity) Timer triggerBatchTimer = new Timer(() => yourBatchBlock.TriggerBatch()); TransformBlock<T, T> timeoutTransformBlock = new TransformBlock<T, T>((value) => { triggerBatchTimer.Change(5000, Timeout.Infinite); ...

This looks like a copied answer
 
copied answer / care
it's not a review!
 
9:07 AM
yeah
 
Zak
Monking @all
 
monking
 
and downvoted.
 
0
Q: What is the logical justification for this discrepency in Python?

Saaqib MahmuudPlease look at the following Pyton code: vec = [ [1, 2, 3], [4, 5, 6], [7, 8, 9] ] flat1 = [ num for elem in vec for num in elem] flat2 = [ num for num in elem for elem in vec] flat1 = [ 1, 2, 3, 4, 5, 6, 7, 8, 9] Fair enough! But flat2 = [ 7, 7, 7, 8, 8, 8, 9, 9, 9] Why is it like that? ...

 
when googling goes wrong
first page 10th hit for "English Checkers game"
and the 9th is the 1st instance of an online version
so I guess this user came here and was "how do I play this, wtf is code"
Welcome to Code Review! We review code here - the author has written a piece of code, we review it for any improvements, then the author has better code and will probably write better code in the future. If you were looking for a place to understand how english checkers work, try wikipedia. If you were looking for a place to PLAY English checkers, try this website I found: flyordie.com/checkers or google "English checkers game online". — Pimgd 16 secs ago
I think that's better than just pounding them into oblivion with abusive flags and what not
 
9:20 AM
is this on topic for code review?
 
Or maybe I'm too nice
 
0
Q: bst insert while keeping track of parent for node to be added

httpNickI am implementing a red black tree for fun and am wondering how I should modify my basic bst insert. Note: this happens before the red black tree rules are applied, it just finds the correct place within the tree to add the node, places it, sets references, value and defaults the color to RED. I ...

 
@MsYvette Oh hello
 
I don't think so @MsYvette, it seems really hypothetical, which is off-topic for Code Review
 
9:21 AM
ah k
 
oh snap I missed that line of chat
 
thanks and hi!
 
Yeah, looks like example code
@MsYvette Thanks for asking =)
 
pleasure :D trying to understand what's a good fit
 
@MsYvette did you see the guide for SO users to Code Review yet?
 
9:24 AM
@Pimgd yes, I'll need to re-read it
 
Nah, was just asking, else I would have found it for you
 
actually where is the guide?
 
ehehe
 
you are meaning not the faq??
 
69
Q: A guide to Code Review for Stack Overflow users

durron597You're on Stack Overflow and you've found a question that seems to be about improving code. You are trying to be helpful, and you put a comment in the question: You should try asking on CodeReview.SE instead. —YourName 2 minutes ago … and suddenly, out of nowhere CodeReview.SE users swoop i...

 
@MsYvette a lot of people (try to) migrate stuff from SO to CR, so we made a meta post
we also have @Duga posting all the "code review" comments in chat
@Duga like that one
 
Duga is a bot?
 
Yeah, written by @SimonForsberg.
More info on her user profile. And yes, it is a she.
@Duga that is... not @SimonForsberg. Simon is not a she. :p
 
@DanPantry Ada is my work in progress.. a she also :D
thanks for the links btw, have bookmarked and am reading.. will prob end up contributing on code review.. (with questions)
 
:) Our C# reviewers are great
 
9:32 AM
@Quill I'm getting aroudn to your thing.. hit a snag with the deploy..
Plug for @JeroenVannevel as a C# reviewer... he's.. quite a character
oh and @Mat'sMug
 
ehh, I can shoot at it too, just don't expect me to find anything more than algorithm flaws, duplications and issues with naming/comments
... huh that's actually a long list
 
incoming WTF
 
how many wtf/min?
 
StackOverflow's new car, the CodeReview recommendation: from 0 to 60 wtf/min in 2.5 seconds
5
 
LOL
s/Codereview/CodeReview/
 
9:38 AM
Okay was the issue with your websocket stuff? @Quill
 
37 mins ago, by Quill
var j = request.jar();
Idk wtf request.jar
 
it JAVAs
maybe?
 
No, it's a cookie jar. The best kind of jar.
And yes, I'm being serious
 
possible answer invalidation by httpNick on question by httpNick: codereview.stackexchange.com/posts/121174/revisions
 
is that the wtf
 
9:40 AM
It's not used, though. The cookie jar feature in request is used to store cookies to be sent with requests. request.jar() returns a new cookie jar
 
@Pimgd no
wtf seriously cookie jar
 
Sending cookies over the internet is problematic.
 
Well, I kid, but sending cookies with requests from a server is problematic.
 
Now I want cookies.
 
9:42 AM
Cookies don't really make sense on server side implementations because there's no user agent to store them or cache them.
 
@Duga ehhhhhh willing to let this one slide
 
Which is why mechanisms like the cookie jar exist - and why we tend to prefer to use Bearer HTTP headers / query strings
There are some examples on the page which use the jar option (rather than method)
tldr RTFM @Quill ;-)
 
MORE edits
 
$ npm docs request
 
Oh, that makes sense why my code won't do multiple domains like that
 
9:47 AM
Yeah. Protip: when designing an API, don't use cookies.
 
but they so tasty
 
Cookies are tasty. But much like the real life ones, internet cookies can be dangerous for you too.
 
how can real life cookies be dangerous for you
 
If you eat too many cookies you will eventually end up the same shape as one :D
 
Or in the shape of cookie monster
you turn blue and furry and your eye start to pop out of their sockets
Whoa that's a pretty gruesome description
overdosing on cookies is a serious problem
wait
problem
revision 5 invalidated an answer
 
9:53 AM
0
Q: Print all path from root to leaf, binary tree

Mosbius8This is my approach. 1. Take a helper array and a counter, keeping track of what has been traversed so far. If it is leaf node, print all till that point. 2. Reduce counter. import java.util.LinkedList; import java.util.List; public class LeafNode { private List<String> list; private i...

 
I'm inclined to roll all his changes back
 
@Pimgd rollback & psot a comment if it invalidated an answer
 
but then the code might be broken?
@DanPantry duhhh but take a look at the revisions
basically I see Code as posted, + 1 edit to fix a mistake, +1 edit to add a feature +1 edit to fix a mistake in the added feature
I'm thinking rollback to rev 3
yeah Imma do that
 
somehow I screwed my code, and the old versions work, but the new versions don't ;-;
 
that beats fixing a bug and having a power outage and having to fix the bug again
but forgetting how you fixed the bug
That's total madness, man
 
9:59 AM
@DanPantry the blue colour is disgusting
 
... chat in console?
 
Yeah, I did it a while ago, but I'm improving it
5
Q: Chat.SE in Websockets

QuillThis is a script that accesses the SE impromptu APIs to receive the fkey, a variable need for connection to chatrooms, and uses it to build a websockets connection which is handled by Node.js. This is also available on GitHub. It requires your username and password in the ws.js file and looks l...

 
@Quill git bisect
 
wat
 
he's telling you to use some git magic to fix all your problems
listen to the wizard
 
10:04 AM
if older versions work but newer ones don't
you can use git bisect to find the revision that caused the problem
 
oh, I don't commit stuff like that, it's all local
 
... git is local
atomic commits, man
 
make a change, test it, commit.
 
If you're not committing stuff locally you aren't using git correctly
 
10:06 AM
Do that 10x, be done with a feature, git push
 
Think of git like a giant undo button
 
basically, I implemented this solution to work for the three chat domains, and that screwed the process
 
And you didn't make a single commit during that process?
 
Maybe your IDE has local history
I know netbeans does, intelliJ does
maybe eclipse too
 
I didn't screw a certain line, it's just a limitation of the process
 
the multi chat domain solution never actually worked
 
too late, you did nothing wrong but we're still gonna force the process of atomic commits on you
Because that's what friends do
 
I do atomic commits at work, just not with this code
 
all code is work
:p
 
I do micro commits for hobby stuff too, just so that when I do a release when I can be arsed
I have a changelog
 
10:08 AM
I do it because I make mistakes far too often
micro commits cover my ass
 
instead of "added some of the features you guys were complaining about, ignored some of the others, maybe I worked on this and it might be broken not sure pls test, I can't be arsed"
 
It's easy to merge many small commits into a larger one for when you want to prettify your history
It's not so easy to split out a large commit into smaller ones
Also, large commits are bad for product dev in general
 
You wouldn't get heavily downvoted on this SE. — PandaLion98 20 mins ago
 
Let's say I create a new feature and a fix for another feature
 
saltyyyyyy
 
10:09 AM
And I put them in the same commit
Now some other feature on the other side of teh app breaks
What broke it? The fix or the new feature?
 
@Quill so much hate
 
the new feature broke it
 
No, you have no way of knowing
Esp if you don't have tests
If a fix involved modifying business logic that another feature relied upon
 
 
0
Q: Binary Search Tree insert while keeping track of parent for node to be added - iteration 2

httpNickI am implementing a red black tree for fun and am wondering how I should modify my basic BST insert. Note: this happens before the red black tree rules are applied, it just finds the correct place within the tree to add the node, places it, sets references, value and defaults the color to RED. I ...

 
10:14 AM
undefined variables. that'll do it
 
@Quill It's unfortunate that $('rm -rf /') doesn't work in some cases isn't it
 
0
Q: An Alternative Vector (Copy Assignment Operator)

Loki AstariContinuing from the An Alternative Vector Taking a closer look at the copy assignment operator. In the following code I am only posting the new version of the copy assignment operator all the rest of the code is unchanged. namespace ThorsAnvil { // Traits classes // SimpleCopyableA...

 
I have so many errors in this code
there was a space in one of my urls
 
Zak
10:48 AM
 
hey
 
You can get better answers @ codereview.stackexchange.com — Mohit Jain 25 secs ago
@MohitJain Code Review SE requires complete and working code. — πάντα ῥεῖ 26 secs ago
 
@Duga denied.
gotta love instant reactions like that
 
11:13 AM
lol
yay! it works
 
and then a coworker places a massive toolbox on your desk
rummages through it for 3 minutes
gets out an allen key
tries it on the back of your monitor
"yep, fits"
cleans up the toolbox again, putting stuff back in it
and walks away
so much for my concentration after that
you have your own desk with your own monitors of the same model, why not use that one O_o
 
you're typing into various channels, how do you select the one you're typing in
 
you type the chat domain abbreviation
 
what's this one?
 
11:21 AM
SE
 
well that's not very helpful
 
it goes site abbreviation, then room number, then message
 
so you have to remember that it's 8595
Some bad UX
 
It's the console
 
World of warcraft (back when) I played used /#
 
11:23 AM
I'm working on something better, but meh
 
so you're in 5 channels
and you type /5 message
to send message to channel 5
that might work here
 
I'm working on commands atm
so you can join other rooms that aren't in the config file
or leave rooms
or star stuff
Ugh, Node.js prompt title is used as the result dictionary key
meaning I have to use 'Chat Domain (abbreviated)' as a key
 
@Quill Where's your hair? New profile pic?
 
Warned the person asking for a requirement that using translated content would be a bad idea because those strings could change.
 
yeah, I got a haircut
 
11:32 AM
Haha okay, thought I noticed something
 
Today the come up to me and tell me a user has asked for a feature that is impossible when using translated content as a string.
.........................................
 
ugh, I have to get rid of my console.log abstraction
 
@DanPantry So you tell them it takes (time to implement feature if we did other feature X properly in the first place) + (time it takes to reimplement feature X the proper way) without showing the math
 
@Pimgd Nah we just said we'd tackle that feature in a year's time.
 
basically: "Sure, I can do that, but it will take 2 weeks, as there is no supporting system"
 
11:35 AM
For some reason, in a new system, we've decided to stick to the schema which has all the issues of the old system
The old schema has no way of differentiating between those types
I told him yesterday the best thing we could do would be create a separate table for this item and use relationships but NOPE
It's almost as if you should trust the developers you hire shrug
 
Fuck that looks gross
 
Don't use red for stuff that isn't an error
 
they're debug messages
But you're right
 
then make them yellow :p
 
... That's not debug
 
11:46 AM
In NodeJS, yellow is debug
 
"Connecting to ..." is what I expect to see as a user
IRC style
 
"opened a connection to" would be debug info
or verbose
 
Yeah, that's fair enough then
 
this ain't a bot, necessarily
more like a client
 
it looks slightly better now, I think
 
12:04 PM
If your current solution works, and you want help to refine/improve that approach then this question should probably go on Code Review, rather than here. — David Thomas 1 min ago
 
I'm talking from the terminal!
 
12:30 PM
@Pimgd I didn't refer to the code in the question because this solution is much more concise (so much so, that just looking at the alternative code clearly answers any queries). The code in the question does a whole lot more because it's not very elegant (as pointed out by the other answer). Yes, it does exactly the same thing the question author describes, in less code and using the same technology as the author's query and with better support for asynchronous processing [because it's not trying to home-brew an entire Block] and integration into TPL Dataflow. — Nathan 30 mins ago
can I flag for mod
err
sorry this one
@Pimgd Please vote based on code merit, not on your (ill perceived) decision as to how much time I may or may not have spent reviewing the code. Congrats, you've just made a regular stackoverlow user decide that CodeReview isn't a great place to hang out and try to be helpful. — Nathan 30 mins ago
I can't explain my stance to this guy without, you know, causing flame?
and comments from me in the style of " just looking at the alternative code clearly answers any queries" -> "not for me" doesn't.. help. I think.
Attempt #1
I don't know how to put this in a friendly manner, but when you say that it's more concise "that just looking at the alternative code clearly answers any queries" - that's not true for me. I don't know about TPL Dataflow, all I see is the block of code without explanation. There has been a meta question about this before, and the community view on this is that you need an explanation to go with your alternative solution. — Pimgd 15 secs ago
... pointing out that -2 means other people also don't like his question or that the comment upvotes mean other agree or that that banner wasn't planted by me isn't the right strategy either...
 
Okay, I redid all the styling
Took forever
I wrote this really weird abstraction layer so I can keep consistency.
 
12:46 PM
I raised a mod flag with the hope that someone with a diamond explains it better than I do
also because maybe a diamond might convince this guy more than words
 
@Quill Bit of an improvement but not quite done yet (execution plan still a bit messy due to repeated inline queries)
(monking - TTGTW)
 
cool
 
At least the ugly joins are gone lol.
 
@Phrancis it needs to be able to run for all users or maybe top 250 or something like that so you can see what your score means
I get 6738 for me but I have no idea what it means =)
 
@Pimgd Well, I'm working on answering this so... but yeah I don't disagree
 
12:51 PM
 
BBL
 
thanks @janos for fixing that situation
 
1:05 PM
I need to learn how to read, it seems
 
@Hosch250 yes.
 
@nhgrif oh snap
 
Zak
The code I built to leverage my report building is working beautifully.
Dim investmentCodenameStrings As Collection
Set investmentCodenameStrings = GetInvestmentCodenameStrings(WbSubsheet2015, WbSubsheet2016)

Dim jonHusseyMonthTotals As Collection
Set jonHusseyMonthTotals = GetMonthTotalsFromAdviserAndCodenameStrings(JonHussey, investmentCodenameStrings, aggregatedSubsheetDataReport, INVESTMENT_AMOUNT_HEADER)
That right there used to take me 500 lines and 3 weeks' coding ^^
 
you can't just wrap a function into a different file, call it and say "this used to take me X time"
or is it more about generalizing what used to be very specific report making code
 
Zak
It's more, the last time I built this report, adding a new "section" (splitting the data out in a different way) involved writing quite a bit of new code for each thing.
 
1:16 PM
and now it's dynamic!
 
Zak
exactly ^^
 
Your code gets a "wacky flailing tubeman award" for being as flexible as a wacky flailing tubeman
 
Zak
And now I can just feed it something like

Give me all [new investments] by [adviser] where [date] is [greater than] [somedate].
I've basically implemented SELECT and recordsets for my data in VBA.
 
you mean [date] [is greater than] [somedate] right
so you can do [date] [in] [dates] too
 
1:46 PM
@Zak That's quite badass, sir
 
0
Q: Snakes Game Using ncurses

user3762742This is my version of snakes in C++ using the ncurses library. I would like to hear from you how this piece of code can be improved and general advice for future projects regarding coding and efficieny. #include<ncurses.h> #include<unistd.h> #include<time.h> #include<stdlib.h> class snake ...

 
@CaptainObvious "SNAKES WELCOMES YOU"
also "but wait there is more code"
duga shhhh is okay
 
possible answer invalidation by user3762742 on question by user3762742: codereview.stackexchange.com/posts/121192/revisions
 
@Duga I said shhhh is okay
 
As noted in the comments on the question, an associative container is unnecessary for this task. A simple vector or array is entirely adequate--faster, simpler, and far fewer WTFs per minute in code review. — Jerry Coffin 42 secs ago
 
2:02 PM
Greetings, Programs.
 
joins channel
gets accept immediately afterwards
I see how this is :)
 
yes
It just knows
CR has gone sentient
2
 
@enderland Hey @enderland ;)
 
Nice advice. Would not have spotted that. Thank You! If I had a higher rep you would have had an upvote. — user3762742 5 mins ago
 
@Phrancis also just FYI, all that code is untested. so 'buyer beware' so to speak ;) haha
VBA on mac is horrible. lol
 
2:08 PM
Yeah, I'm working on it now, I'm breaking down that array in a few different functions as I need it to be a bit more granular in how it matches subjects, but great advice overall
I honestly didn't even think of using ThisOutlookSession to declare those globals
 
My previous outlook VBA had a TON of macros running like this
Current employer uses google mail though
 
Would it be possible/advisable to make Private Function matchesErrorSubject(sbj As String) As Boolean also return the name of the folder to move it to? (since I have several different ones depending on matching outcome)
 
Monking
 
I thought of just using the same code I already have MarkReadAndMoveToFolder Item, "_ErrorDump" inside the items_ItemAdd but wondering if it would be better to move that name into the matches function
 
Zak
Possible? sure. Advisable? In general, SRP would say no.
 
2:15 PM
OK
 
Good Monking morning!
 
@Malachi hey!
 
2:32 PM
I love reviewing code
Most of the time you can just feel the fun
 
how is everyone doing?
 
pretty okay
 
@DanPantry what's this plugging business
 
@JeroenVannevel it's for fixing your memory leaks
 
Zak
2:48 PM
@Malachi I'm pretty awesome ^^
 
@Malachi Pretty good, it's FRIDAY
 
@Phrancis As long as nobody posts that awful video, it will be fine.
4
 
funny story - hipchat has a (#firstworldproblems) and it's a picture of her
 
I'm voting to close this question as off-topic because this question belongs to codereview.stackexchange.comtimgeb 22 secs ago
 
wow duga got a match
 
@DanPantry for this, you get 0 stars and a sad smiley.
=(
 
worth
 

« first day (1028 days earlier)      last day (2991 days later) »