« first day (766 days earlier)      last day (3250 days later) » 

12:00 AM
There are 1391 unanswered questions
 
@Duga PROGRESS!!!
 
@rofl who's the 13 year mod you've been speaking of?
 
@Duga Oh, I thought that guy was calling us a "Hovercraft Full Of Eels."
 
@DJanssens Young mods have been Nathan G (14) on ask different, Undo (also 14, I believe), Doorknob, Chris Jester Young, and others... I think they were all 14 when mods
 
12:05 AM
that's really impressive. When I was 14 I was playing with my Lego bricks..
 
Heh, lol. The chance of me becoming a mod is so extraordinarily low...
 
Lol, I couldn't give the time since I stopped college (yeah, that's right), but I doubt I'd be elected either.
 
Boltclock is/was 15 or something when elected to mod on SO
 
Don't worry, you don't have to be a mod.
 
I wouldn't know what to say about myself if I was nominated.
 
12:07 AM
Jon Skeet isn't.
He was nominated once by someone else, but declined.
 
Of course he isn't. He can already control the universe.
 
:D
 
Oh, boltclock was 19...
but he's not the youngest....
 
All I have to do is re-implement Search functionality, and I can release.
Doorknob has tried and been whupped at SO several times.
 
Maybe someone could convince me to run when CR officially graduates...
 
12:10 AM
Last I heard, we want to elect Jon R. Sharpe and nhgrif for SO.
Lol:
> In some cases, flyouts from the Taskbar (including Start, Cortana, Network, Battery, and Action Center) fail to fly out. This is a transient issue, and after retrying a few times it will succeed. We are also working to service this issue with an update.
Yeah, Start and Action Center and the Search button when not expanded don't work.
And retrying doesn't help.
 
@EthanBierlein You should run when CR officially graduates.
 
How long would I have to serve if I ran?
If we graduate this fall, I might run, but I'd probably stop in May or so.
 
@Hosch250 Once elected you serve as long as you feel you can. You are elected until you step down, or do something stupid and get the diamond removed involuntarily
 
I mean, would I be stupid to run if I knew I might not be able to serve a full year?
 
On the other hand, if you know you have a shelf life, you should probably state that ahead of time
 
12:17 AM
@Hovercraft I wasn't sure where to put this. I felt like I had too specific a question to lump it into Code Review. — spfrommer 55 secs ago
 
Also, nobody knows the future, so if you think it's only a case of "might not be able to" then you should consider that you also "might be able to"
 
This question appears to be off-topic because it is a code review request. This is better suited to the Code Review Stack Exchange site. Before posting there be sure to read their FAQ to ensure that your question meets their guidelines. — John Conde 38 secs ago
 
0
Q: Suggest faster way of cleansing data using python

SiddarthPlease suggest faster way of cleansing data. Below is my implementation which I ran on 100000 records. import string from nltk.tokenize import word_tokenize from nltk.corpus import stopwords import time result = open('processed_data.txt','w') stop = set(stopwords.words('english')) removePunct ...

0
Q: $scope. or this.?

Burn_E99I have been writing web-apps since December, and have seen two different styles of defining scoped variables. I see some small feature differences between the two, but I would like to see others opinions on which way is the better way, or the more Angular way. Version 1: JS: var app = angular...

 
I'm gonna head to bed. Have a goodnight/day folks!
 
tata
 
12:26 AM
Good night.
 
Good night @DJanssens
 
1
Q: Is this method of storing customers orders secure?

DyanI'm developing a shop system and using this method to store the customers with their respective orders: try { $connection = new PDO("mysql:host={$HOST};dbname={$DB_NAME}", $USERNAME, $PASS); } $connection->beginTransaction(); $sql = "INSERT INTO orders (customer_id, customer_name, order_val...

 
Data Explorer (http://data.stackexchange.com) will be down for a few minutes while we migrate it to New York.
 
@Stack NOOOOOOOOOO
 
Thanks, @rolfl
And, the patch MS submitted did NOT work on my system :(
 
12:33 AM
@EthanBierlein chat will be going down soon
 
:(><)
Those are meant to be teeth...
 
5 hours ago, by Stack Exchange
We will be moving Chat and Data Explorer tonight in preparation for the #milehighops data center move: http://stackstatus.net/post/121041376199/maintenance-june-8-2015
 
0
Q: Structure of parser in clojure

ariI'm working on my first Clojure project, which is a parser. Since it's my first project I'm unsure of many aspects, from my general approach to solving this problem to the small implementation details. I also don't know anyone proficient in Clojure so any guidance is welcome. In higher terms, my...

 
I don't know why this has an upvote:
0
Q: Fast parse for JSON data in Swift

ManicMonkOnMacWe're doing a project in Swift and JSON parsing is a hotly debated topic. My usual way of parsing is using the if let condition. One of my team members came up with this method parsing JSON using switch(key,value): class LineItem: NSObject { var id:NSNumber? var variantId:NSNumber? var lineIte...

Are we saying we want more questions like this?
 
@CaptainObvious The tag strikes again. Burned.
 
12:45 AM
@nhgrif Nope, but someone feels the question is useful, and that's OK
I took a step back from that question, looked again, and figured it really was not off-topic.... crap, yes, but not off-topic
Rather, on-topic enough to carry the benefit of the doubt
 
Data Explorer is back online, we're working on moving the chat data now - outage will be a bit later.
 
I still don't understand how anyone can consider the question useful in any meaningful way.
The question started as a comparative review, which I already don't like... and was off-topic as unclear (by my judgement) because he was asking which is "better" without specifying what better meant.
Then he clarifies it by specifying he's concerned about which is faster, and somewhere in here, you decide that now it's clear enough (or maybe it was all along it just took two reads).
But to me, it's still a "which is faster?" question, and as far as I'm concerned, those questions at a minimum should be sitting at -3, regardless of whether or not we close them as off-topic.
And I comment "If you have two horses, race them.", hoping to encourage him to just find out on his own in the only sane way... in the only way that anyone could answer the question. What I did not foresee was that he would move that answer to his original question "which is better (faster)" into the question
And now, what he actually wants reviewed is questionable.
 
If you take in to account there is actual code, it works, they're looking for any and all feedback with a focus on performance, then really, I can't call it off-topic.
unclear, but more clear than before.
 
I'm not arguing for off-topic. I'm not making that case right now.
I'm just curious why anyone would think to upvote it even once, and why more people haven't down voted it.
 
Friends, and visibility?
 
12:51 AM
His comments are now actually suggesting that he wants me to review the snippets where he actually did the speed test rather than the originally posted code.
 
Because, Swift?
I vote less when I can't read the language properly.
 
This question is a massive mess. Whether or not it's on-topic, I haven't decided for myself yet.
 
Reading now.
 
- can be on-topic, off-topic, upvoted, and downvoted.
unclear is normal.
so is clear
 
And it actually really doesn't matter whether or not I think it's on-topic because it was mod-hammered closed and then mod-hammered open after my close vote, which means I don't ever get to vote on the question's scope again.
 
12:53 AM
No, you don't, but I also saw it in the reopen review queue.....
 
(hmm, mod-hammer is irrelevant, this would be the case even if 5 community members reopened it)
 
(after significant edits)
 
Now, I have another question.
Don't we (or SE) have a rule about resolving disputes with co-workers?
 
I don't think that's relevant here.
 
> My usual way of parsing is using the if let condition. One of my team members came up with this method parsing JSON using switch(key,value):
 
12:55 AM
I don't think he's asking his question against the spirit of Code Review.
 
Half the code isn't his.
Half of it is.
 
he maintains it
 
He (and his team) maintain all of the code.
 
OK.
 
And he's not trying to get his team member fired. He's trying to validate whether or not his team member's approach is worth using.
And using Code Review as their code review tool, rather than reviewing code internally. Which is probably good, because apparently they didn't even know how to answer the question of which is faster, which was seemingly all they wanted to ask.
 
12:57 AM
They actually claim to have an internal review process as well ...
(switch of string is slow)
 
It's not the switch that's slow. It's string comparison.
Whereas accessing dictionary values is comparing hashes.
 
Chat going down in a little bit.
 
Whats up team :-)
 
Hello, Loki.
 
Debating a CR question's worth:
0
Q: Fast parse for JSON data in Swift

ManicMonkOnMacWe're doing a project in Swift and JSON parsing is a hotly debated topic. My usual way of parsing is using the if let condition. One of my team members came up with this method parsing JSON using switch(key,value): class LineItem: NSObject { var id:NSNumber? var variantId:NSNumber? var lineIte...

And waiting for SE to cut us off in the middle.
 
12:59 AM
In need of down votes.
How long is outage?
 
They plan for 10 minutes.
 
scheduled to be about 10 minutes IIRC
 
Wing Commander on Netflix....
Hey Loki
 
If I could cast a close vote on that question, I'd probably cast a too broad close vote.
Or maybe even still an unclear.
I actually have no idea what he actually wants reviewed at this point.
 
1:02 AM
The second version, based on the comments.
 
0
Q: How to reshape networkx graph?

O.rkaSo I created a really naive (probably inefficient) way of generating hasse diagrams. If anyone knows of an easier way to make Hasse Diagrams, please share some wisdom but that's not the main aim of this post. Question: I have 4 dimensions... p q r s . I want to make a tesseract shape but I ha...

 
The second version of what?
The second version of "parsing"? Or the second version of testing?
And either way, why is there all this other code in the question?
@ManicMonkOnMac Can you please edit your question to clarify (in the question--not comments) exactly what it is you want reviewed? There's just a lot of code here, and between the multiple revisions, the huge pile of code, and the comments, I'm not clear on what you're looking for. — nhgrif 55 secs ago
 
> I have no idea how to reshape it.
 
Oh, I thought that was a CR post.
 
1:18 AM
Quiet in here all of a sudden.
 
Writing an answer.
 
To what?
 
0
A: Rendering JSON array as a tree

Hosch250Dead code Dead code doesn't do anything except clutter up the code and confuse readers. Is this for debugging, or is it buggy code? Something else, maybe? Whatever it is, it should be removed once the code is working as expected. //displayTable(childs); Indentation for(var i=0;i<data.leng...

For my 19'th JS answer.
Just one more for a badge.
 
And this is still one-away from Necromancer.
 
@Jamal Not anymore, it isn't.
 
1:25 AM
480/1k for the gold review queue badge on Close Votes on SO...
 
:-)
Go find answer #20!
 
I've almost used my SO flags up when I was actively reviewing there.
 
This question is amazing:
-4
Q: Preventing threads in Xcode

Jaden RanzenbergerI am starting to learn Objective-C, and am using Xcode, but every time I run the program, a thread is run, and prevents any of the code to work. Can you guys explain how I can deal with this? And educate me on it a little bit? I have written a simple console log to demonstrate my problem. Once ag...

 
If there was an Epic badge for using up flags, I'd probably be close to getting it on SO.
 
How many flags do you have on SO?
 
1:27 AM
> a thread is run, and prevents any of the code to work
:O
All of them.
It goes up the more you flag good.
 
@nhgrif I'm by no means an expert in Objective-C, but I believe you're supposed to call a function. :P
 
45
A: Why does PHP add "\r\n" to an empty string?

HalcyonIt's possible this character is in your sourcecode somewhere, for instance at the end of one your scripts, like: ?>\r\n. A best practice is to never include the final ?> in each file to avoid accidental output. This recommendation is in the PSR-2 Coding Style Guide. The closing ?> tag MUST ...

 
@nhgrif Over 14k.
2
 
PHP best practice: don't close your tags
 
omg...
@Jamal I think he might have figured out that he wasn't calling the function on his own but only if he were capable of figuring out those blue arrows in the left margin are breakpoints.
 
1:28 AM
I would probably have another 1k or 2k, but I haven't been flagging each day.
 
@nhgrif FlagCount--;
 
Hmm. Swift 2.0 adds try-catch.
 
About time.
 
Says the guy who knows neither Swift nor Objective-C and knows how unimportant try-catch is.
 
What about finally?
Lol.
I've found Finally statements being optimized away in C#, for some reason or another.
 
1:35 AM
I don't really care for finally statements.
 
In this case, I just changed it to run after the catch.
Me either, I've never used them.
 
@Hosch250 So, you never put return statements in your try/catch blocks?
 
Umm, probably, but not recently.
What would I need a finally for then?
 
@Hosch250 u wot m8?
 
-4
Q: Swift 2.0 for Visual Studio?

FloSo Apple just announced that Swift 2.0 will be open sourced. My first thought: great news for me as a developer in Visual Studio on Windows. But I can't find any details on this being available for Windows, only Linux...which seems kind of strange to me considering the Linux market share. Does a...

 
1:37 AM
finally is guaranteed to execute after your try/catch block, even if you return out of it.
 
The finally was just to change the wait cursor off, in this case.
 
But code after the try/catch/finally won't execute if you return out of the try/catch
 
If I return in a try/catch, I want to exit the function permanently.
 
Windows announced a month ago that .NET would be open-sourced. I can't write any .NET code in Xcode. Apple announced Swift 2.0 would be open sourced in the future and Swift 2.0 is only available on Xcode 7 BETA (and they made this announcement, what, 8 hours ago?), and you're already wandering how to get Swift on other IDEs? Hold your horses buddy-boy... — nhgrif 7 mins ago
 
I put an extra default return outside the try/catch in this case.
 
1:38 AM
You cannot outrun finally unless the VM crashes
 
I have no idea what was happening, but moving the LoC out of the finally fixed it.
 
@Hosch250 Perhaps... but if you want to turn off the wait cursor, this is likely something you want to do whether or not you hit an exception... and it's something you want to do even if you early return.
 
It worked fine in debug, but didn't work out of debug.
Oh, I get it. We weren't returning there.
 
Sounds like something you should've investigated deeper and asked clarification on SO if needed
 
Probably.
 
1:40 AM
Nobody is helped with bandaid code
bandage? bandaid?
Who knows
 
On the contrary, band-aid code helped encourage me to leave my previous job.
So it can help.
 
        private CancellationTokenSource _cancelTokenSource;
        private async void Refresh()
        {
            _cancelTokenSource = new CancellationTokenSource();
            var token = _cancelTokenSource.Token;

            Control.EnableRefresh(false);
            Control.Cursor = Cursors.WaitCursor;

            try
            {
                await Task.Run(() => RefreshAsync(token), token);
                if (_results != null)
                {
                    Control.SetContent(_results.Select(item => new CodeInspectionResultGridViewItem(item))
Previously, the Control.Cursor = Cursors.Default; was inside the finally.
 
Not all questions must be answered. Not all questions have answers. — nhgrif 21 secs ago
 
Empty catch... fffffuuuuuuuuuuuuuuuuuuu
 
YES
 
1:42 AM
I did NOT write that one, for the record.
I have written empty COMException catches, just to eat a fatal error (@Mat'sMug says you can't recover from them anyway).
 
Did you leave a comment in the empty catch explaining that?
 
// gulp
 
Explaining that I didn't write it?
 
-1
Q: I am curious why my code behaves different when I change the if else order

Zeyad YasserI am learning C++ now and wanted to know what was going on not just let it pass without knowing so hear is my code that behaves as it should and outputs "this unit is invalid every time" when unit is equal to the specified units #include <D:\std_lib_facilities.h> //this program compares user inp...

 
VSDiagnostics has an analyzer for that
just saying
 
1:44 AM
Oh, that it is a COMException?
 
You could've saved yourself this horrible embarrassment
 
No.
 
@Hosch250 No, in the empty catch that you did write.
 
I'm back.
 
I'll do that in all future ones.
 
1:44 AM
Hello
 
I'm voting to close this question as off-topic because it is not seeking a code review. Asking for explanations of code is off-topic for Code Review. — nhgrif 50 secs ago
 
what are we talking about here, I'm seeing a catch(TaskCanceledException)
 
oops
 
Can someone without edit privileges go on an editing spree so I can get the last 4 reviews to get a badge?
 
People without editing privileges aren't usually in here.
 
1:47 AM
But make good ones - rejects still count.
So I see.
There are a few people (Quill, I believe).
 
There's always tag wiki edits.
 
I need to review 4 more, not make 4 more.
I want Proofreader.
 
Because you've changed the logic. Read the 2nd snippet again. If unit is m you satisfy the first condition because unit != "cm". — Mat's Mug 18 secs ago
and CV'd
 
I'm getting closer to the first page.
It might be a little tricky getting there, though, unless I start writing more answers.
 
@Mat'sMug CV'd but rewarded anyway.
 
@nhgrif where did I tell him to change || for &&?
that sticky upvote button is annoying
 
@Mat'sMug Just be glad there is a sticky downvote button too.
I like it.
 
lol
why is that esplain-teh-codez post still not closed?
 
Is the sticky vote thing for certain people only?
 
Which?
 
1:55 AM
-2
Q: I am curious why my code behaves different when I change the if else order

Zeyad YasserI am learning C++ now and wanted to know what was going on not just let it pass without knowing so hear is my code that behaves as it should and outputs "this unit is invalid every time" when unit is equal to the specified units #include <D:\std_lib_facilities.h> //this program compares user inp...

 
@JeroenVannevel Yes.
I only have 1 vote...
@JeroenVannevel:
194
Q: A/B testing the sticky vote controls - give your feedback, please

Jarrod DixonFirst, apologies for not creating this feedback thread earlier - in hindsight, a change to such an established feature of our sites really does warrant some explanation. We're running an A/B test on Stack Overflow only that places half of registered users with >= 15 reputation in a variant group...

 
@Hosch250 speaking of exception handling...
        var clsName = _vbe.SelectedVBComponent.Name;
 
Yes?
 
NRE right here when _vbe.SelectedVBComponent is null
(fixed)
 
Oh, duh.
NRE's are awful.
 
2:00 AM
and it's not necessarily a class
could be a module too
 
That's super neat.
 
What do you think about combining these if statements into 1 if?
if (a === null || b === null)
    return NaN;
if (a === undefined || b === undefined)
    return NaN;
if (Array.isArray(a) || Array.isArray(b))
    return NaN;
Optional? Should? Shouldn't?
 
if (a === null || a === undefined || Array.IsArray(a)
 || b === null || b === undefined || Array.IsArray(b) {
    return NaN;
}
 
Yeah, I would split it up across multiple lines.
 
2:05 AM
@Hosch250 Where the hell are your brackets?
2
 
@nhgrif That isn't my code, thank you very much.
 
@QPaysTaxes Where the hell are your brackets?
 
@QPaysTaxes Line up your ||'s...
 
tss.. mine's cleaner :)
 
I am writing another review, this time targeting the Generalist badge.
 
2:07 AM
BRACKETS
 
NO BRACKETS. PYTHON
 
no shit
 
You know.. VSDiagnostics has an analyzer for that
3
 
I thought it was JavaScript
NOOOOOOOOOOOOOOOOOOOOOOOOO!!!! I WROTE PHP!!!!
4
 
Because, it's, PHP.... — Ethan Bierlein 11 hours ago
 
2:08 AM
OK, I'll mention it as an aside because you aren't unanimous.
Merging those ifs.
And, brackets.
I could have mentioned it in the last review I wrote.
I'll leave that to someone who doesn't know JS as well as I do.
Just kidding, I didn't make any JS-specific comments, IIRC.
Those are ugly brackets.
8 mins ago, by Mat's Mug
if (a === null || a === undefined || Array.IsArray(a)
 || b === null || b === undefined || Array.IsArray(b) {
    return NaN;
}
 
They're somewhere between C# and Java -style, ...but not quite either.
aaah
 
I'm on a mission.
 
killing zombies?
 
Everyone is on a mission. The mission.
 
if (
    a === null || b === null ||
    a === undefined  || b === undefined ||
    Array.isArray(a) || Array.isArray(b)
) {
    return NaN;
}
 
2:14 AM
I have no guns! But plenty of ammo, I hope to grant more to the zombie killers. Valiant as they are! They deserve recognition.
Translation: Going through user's old posts, finding their lowest score answer and up-voting them. Morale is king.
 
I'm gonna see if I can kill some Python zombies.
Maybe some JS ones.
 
Oh great slayer of Python zombies.
 
@nhgrif that maintains the original short-circuiting logic and I thought of doing that... but it's not very pretty. I think I'd kill the newline after (
 
@nhgrif That is how I do mine, except for the newline after the (.
 
@Legato Well, I am at the bottom of the list of top answerers for Python.
 
2:17 AM
Lay waste to treacherous zombies and see title rise!
 
Onward I push, my mission, destroy the hordes....
 
@QPaysTaxes you explain why it's as good as it's going to get
 
If it's fine, I'll delete it. I'm going to post like 9-19 more.
 
Is it as good as it can get? Or is it as good as it can get to your knowledge?
 
I'm going to start saying "You've been mugged!" on awesome @Mat'sMug @Lyle'sMug answers.
 
2:21 AM
lol
 
Opinion poll - which is better:
if (a === null || b === null ||
    a === undefined || b === undefined)
    Array.isArray(a) || Array.isArray(b)) {

    return NaN;
}
if (a === null || a === undefined || Array.IsArray(a)
 || b === null || b === undefined || Array.IsArray(b) {
    return NaN;
}
The first shows each condition on its own line.
 
Neither
 
first one, because micro-performance-optimization
 
The second is somewhat neater, which is always good.
 
it should be a separate method
Boom. Minds blown.
 
2:24 AM
^^ totally
 
@JeroenVannevel You always put early-returns in separate methods?
I suppose, IsInvalidData(a, b)
 
I'm not saying the return should be in a method
No, not that either
I'm saying the conditions should be
 
@JeroenVannevel what if this is a method?
 
This is in a method.
 
no, not in a method. a method.
 
2:25 AM
0
Q: Hello world parallel

LegatoI'm introducing someone to JavaFX. It still feels relatively new and I don't take being someone's first exposure to something lightly. I want to know if there's anything I'm doing unconventionally, inefficiently, or just plain oddly in this code? Although it is relatively simple, If fresh eyes co...

 
Oh.
 
bool IsShittyLanguage(object o)
{
    return o === null || o === undefined || Array.IsArray(o);
}
if(IsShittyLanguage(a) || IsShittyLanguage(b))
{
    return NaN;
}
 
damn right
 
Yeah, I get it.
 
Label label = name.isEmpty() ? new Label("Hello user!") : new Label("How's it going, " + name + "?");
 
2:27 AM
Thanks santa!
 
Label label = name.isEmpty()
    ? new Label("Hello user!")
    : new Label("How's it going, " + name + "?");
actually...
 
Ooh. 20 days from fanatic!
 
and posted as an answer :)
 
0
Q: System.Drawing.Bitmap Wrapper Class

TrauerI'm create 2 classes to help me work with images in C#. A abstract FastBitmap class and a FastBitmap32 class that inherits from FastBitmap. I created a abstract class instead of a interface so I don't have to repeat myself creating overloads for trivial methods when I decided to create other clas...

 
0
A: Natural sorting/comparing algorithm in TypeScript

Hosch250Dead code interface NaturalSortConfig { keyFunc?: NaturalKeyFunc; //desc?: boolean; //caseInsensitive?: boolean; } Dead code does nothing, except take up screen space, and confuse people who don't know why it was written and removed in the first place. Braces This is a bit of a h...

And I got a nice, shiny JS badge.
1 more vote on that, and I get Generalist.
 
2:40 AM
Get general'd
 
Thanks.
 
How many votes today?
 
40.
 
One more vote on this and I get a nice answer badge.
9
A: Grading scores from 0.0 to 1.0

Ethan BierleinYes, your code is correct, although I would recommend adding comments, and following the style guidelines of PEP8. Here are a few tips I have. You should specify what type of error you want to except. If you just type except:, other errors could go un-noticed. Typing exit() really isn't neede...

 
Is someone serial voting me again?
 
2:42 AM
^ @Hosch250
 
@EthanBierlein Sorry, already voted.
Someone else gave you a vote, though.
 
Woot.
 
I accept the Theoretical Vote :)
 
Congrats. :D
I always look for people who are 2 away.
Entices others to get them the badge. xD
 
2:43 AM
@Hosch250 Yeah, it looks like you got serial voted. I had that happen to me two days ago.
 
Oh, I don't know if +50 will revert.
I've gotten +170 in 40 minutes before.
 
Pft, hardly serial voting. :|
lol...
 
@Hosch250 if it cost the voter 20 votes, no chance.
 
Probably will. All the votes are on separate questions, and within the time span of one minute.
@Legato I had less votes than that in about a minute and they got reversed.
 
I believe.
 
2:45 AM
Depends on whether other posts in the same thread were voted on.
Dishes time, BBL.
 

« first day (766 days earlier)      last day (3250 days later) »