« first day (822 days earlier)      last day (3194 days later) » 

12:03 PM
@Mat'sMug So, I've gotten 500 or 501 from a project at work...
The server side was Ruby-on-Rails. It passed back one of those two error codes whenever I was trying to access or update an object that didn't exist.
Like if I had the ID for something that had already been deleted, and I was trying to get it or update it (or delete it maybe)
New post: The Ten Commandments of Programming http://importblogkit.com/2015/08/ten-commandments/
I don't know why that waited till 2:09AM to tweet... it was scheduled for 10:00 AM.. :/
 
@nhgrif saw that. Good post.
 
I just now updated with a question at the bottom.
This question is ugly:
-1
Q: Binding data to class

user1566277I wrote a simple string parser and few implementation came to my mind by I am unable to weigh them. First Implementation struct ParsedData { int version; string protocol; string address; // some more fields } class DataParser { private: ParsedData _parsedData; public: DataParser(); ~DataParse...

 
12:22 PM
Okay , sorry my bad, close the question. I thought I could ask conceptual question. Thanks anyways. — user1566277 21 secs ago
What gave him that idea...
 
And "unclear" close vote would also work here.
 
@nhgrif Python.
@nhgrif Indeed.
 
I mean, in general, this is one of the biggest reasons why I hate comparative reviews.
 
So many good reasons to choose from.
Users forget to benchmark their questions often enough, on comparative they almost never benchmark.
 
For a comparative review question to be okay, we have to start with two pieces of code that take identical inputs and produce identical outputs, for them to be different approaches at the problem, and then you have to define what "better" is
And at the end of the day... what value is there in the comparative review, really?
Your criteria for better is usually going to be something measurable, like speed or memory.
In which case... here isn't the place for measurement requests.
Go to Stack Overflow and find out how to benchmark code, then benchmark your code, and you have your answer.
 
12:27 PM
Comparative is usually for people who don't know what they want. Which is a problem.
 
And when it's not something measurable, it's something like "readable" or "maintainable"
Which... two separate implementations doesn't make sense really... and the readability or maintainability shouldn't be the deciding factor between two drastically different implementations, not really.
 
If the speed is around the same, I think those two are great factors.
 
If all other factors are the same, then perhaps.
But I don't think that makes for a very great Code Review question.
Because ultimately, it's asking "A vs B". It's a "yes"/"no" question, which isn't good for the Stack Exchange format.
 
@nhgrif While that's true, it's often asked and considered on-topic anyway.
 
It's only considered on-topic by some.
There are several of us who consider comparative review off-topic.
I don't vote to close every comparative review, because it'd be a wasted effort.
 
12:30 PM
Perhaps we should take it to meta for .
 
It's been done, several times.
 
I think there already is a meta...
 
But I encourage you to go find one of the posts and add your two cents.
 
It often leads to code understanding instead of review, which is another problem.
 
I don't really agree that that's a problem
Or rather, I don't think it's a problem for answers to spend time helping people understand code.
But if that's done in place of an actual review, then yes, that'd be a problem.
But actually, I think I see your point...
A comparative "review" can easily distract from an actual review happening.
 
12:35 PM
@Dee codereview, as the name suggests, is for asking people to suggest improvements to your code style/structure/correctness, while SO is strictly for problems that you're struggling with while programming — goncalopp 1 min ago
 
If we just posted CodeA, then CodeA would get reviewed.
If we post CodeA & CodeB, then we'll spend a lot of time explaining why CodeA is better than CodeB.
We may or may not even make any improvements on CodeA.
 
Indeed.
It would turn Code Review into Code Selection
No more reviewing.
 
I mean, in fairness, there are only 181 questions tagged .
and there's stuff like this: codereview.stackexchange.com/q/98787/36366
Which isn't even a real comparative review...
The second set of code isn't even the authors...
 
@nhgrif VTC'd.
 
yea, I was writing a custom reason right now
I'm voting to close this question as off-topic because the author is not actually seeking a review of his own code. Instead, we're being asked to compare the author's code to someone else's code and tell the author which set of code to use. The author appears completely uninterested in improving his own code (he'd rather just use the other code if it's better). — nhgrif 8 secs ago
Hmm.
@EthanBierlein is the one who edited in the other set of code..
 
12:44 PM
@nhgrif He pasted the content of the link in the question.
Something which is frowned upon by some and acceptable by others.
 
I know. Is Ethan legally capable of doing that? Stuff posted to SE is automatically put under CC-by-SA copyright.
 
Would it be worthy of a meta? There is so much wrong with that question, the edits and the author's intent.
 
If you want your code reviewed, re-ask your question on codereview.stackexchange.com. Please check their help center for guidelines on how to format your question before asking. Specifically, you should include the code in the question itself rather than linking to it. — Matt ♦ 33 secs ago
 
0
Q: Rails - DRY similar methods?

BrauserIn order to reduce redundancy in my app, I have added the method self.find_or_keep(object) to many of my models in order to find existing records with the same values, so I can reference the already existing ones instead of creating new records. Basically, what the method does is checking most at...

 
So, I've made one commit to my current project and already eliminated an entirely file.
 
12:52 PM
@nhgrif I'm not even sure, this bit: "Just now I found a math.SE answer. This answer do not discuss anything about gradient/slope technique. Why?" seems completely off-topic.
 
Eventually, I'll be adding files, because they have such big do-everything classes, but I'll also be eliminating unnecessary files along the way.
 
@nhgrif I would assume, that, by the blockquote it would have some special attribution? Perhaps when he posted that code he should have included the attribution to the source of it instead?
 
Everything on SE is under CC-by-SA. Adding any sort of attribution doesn't change that, and adding any other copyright notice is just confusing (and not even wholly applicable necessarily).
And unless Ethan is the original author of that code or somehow related to that code in a way we don't understand, he doesn't possess the legal right to put it under SE's CC-by-SA most likely.
Even if we roll all the way back to the original version of the code, it's just this guy's code, a link to the other code, and a request to compare.
So even at that point, I think the question is still off-topic anyway.
 
I didn't say it wasn't off-topic, just that I would assume quoting another's code in blockquotes would have some impact on the license.
 
No.
 
1:00 PM
It's as if I quote someone else's blog, and drop it in blockquotes and say something like, "According to x's blog: ..."
 
Sure, but...
All that does is potentially bring you into compatibility with the original license the code was put under.
 
I mean, the blockquote should imply that SE has no control over the license for that particular code.
 
No...
That's not how licenses work.
The block quote just puts it under compatibility with the original license (potentially, not even guaranteed... but best case scenario, that's the most it impacts)
 
If I quote someone else's code on my blog/whatever and indicate where it came from, it does not fall under the license of my blog.
 
It still goes under SE's CC-by-SA.
@EBrown Yes it does.
 
1:02 PM
Prove it.
Because I've seen time and time again where that is false.
 
In the form you posted it (which includes the attributions)
 
(The blog part)
 
No, all you've seen is that you don't understand licensing.
Posting it with attribution is okay because almost all licenses allow for copy with attribution
All that does is prevent you from violating the original license it was posted under.
That's all.
 
And in that sense: if you are really going to show code to receive comments on it .. why not turn to codereview.stackexchange.com? — Jägermeister 41 secs ago
 
It's like if you make use of some library that's open source.
 
Well, libraries are slightly different since they're different files
 
Regardless, the license that the site that code comes from is: creativecommons.org/licenses/by-nc-nd/2.5/in/deed.en_US
 
But if you copy-pasta'd some code into your library
In that case, then, maybe @EthanBierlein could legally copy it in here (with attribution) because that license is open.
 
That license does stipulate Non Commercial and No Derivatives as well.
I think the link to that site counts as the attribution bit.
 
The point is that no matter what license it is under, it didn't come from SE, so it's not SE's license, it's not the question author's license, and it's not Ethen's license.
 
1:09 PM
yup Kira i hear you. Will post a seperate question on codereview stackexchange as it is not allowed to be posted on SO — vignesh 21 secs ago
 
Also, this bit: "Just now I found a math.SE answer. This answer do not discuss anything about gradient/slope technique. Why?" bothers me.
 
@EBrown when it comes to licenses, I encourage you to know, not think. And when it doubt, don't copy&spare into another license (or at all)
Keep in mind that your profitability to any employer lies in code you can write that can be licensed.
 
0
Q: How to create a nested class when subclassing

br3ntI'm wanting to create a pair of classes. The second of the pair sub-classes the first, is nested within the first, and only has the addition of being an Enumerator. Like so: MyClass # this is the parent class MyClass::Enumerator # it has an Enumerator which...

 
@vignesh No. This would be off-topic on Codereview.SE as the code is not working. — Ethan Bierlein 51 secs ago
 
-1
Q: WIFEXITED always returning 1?

StormByteI am testing the WIFEXITED to see if a child process exited abnormally or normally, according to documentation, it should return non 0 status for a child process that terminated normally. However, I on purpose created a code which makes SIGSEGV on a child to test for WIFEXITED (this is or should...

 
1:20 PM
1
Q: Git: How to protect develop/master branch in git-flow (from rookies) via access control?

user49283The previous days I read https://www.atlassian.com/git/tutorials/comparing-workflows/forking-workflow to which I have a a question. If one uses the Feature Branch or the Gitflow Branch Workflows in a project: Is there an option that a user pushes a feature branch as a tracking feature branch to ...

 
@CaptainObvious off-topic
 
@Malachi:
0
A: Desktop notifications for queue items

QuillThis is mostly personal preference, but, I usually stack the @matches in descending size: // @match *://*.stackexchange.com/review* // @match *://*.stackoverflow.com/review* // @match *://*.superuser.com/review* // @match *://*.serverfault.com/review* // @match *://*.askubuntu.com/review* // @...

 
@nhgrif Closed.
 
monking
hey I will take a look at that in a minute @Quill I am adding another set of memes to Memer
 
@Malachi Cool! Which set?
 
1:28 PM
scifi
 
oooh
 
okay maybe not
 
Why's that?
 
I might let someone who is better at regex and manipulating statistics surrounding English usage handle that
because they are like ideas and not a simple phrase, the meme can have many many different forms.
 
Perhaps ping @IsmaelMiguel in the JavaScript room and get his regex skills to help you
2
 
1:36 PM
thank you @RubberDuck
 
Oh wow. That's what I get for writing code at 4AM... I suggest you take a look at the full context of the code and score some more rep there with an answer based on your first paragraph. Anyway this is a very educative answer here, thanks! — Mat's Mug 42 secs ago
 
SELECT 'Monking!' AS [Greeting];
 
While you can omit the radix argument from parseInt, MDN doesn't reccomend omitting it. — Ethan Bierlein 1 min ago
@EthanBierlein: recommend
Thanks for the comment, though!
@Phrancis hello
 
1:53 PM
@Quill have you installed that Desktop notification script?
 
@Malachi I can't
I have a bunch of plugins that rewrite the review page
and I already have a plugin that does notifications for post score changes, comments, achievements and messages
 
@Malachi Do you plan to add the desktop notifications script to the Chrome web store?
 
Simon Created the Base, but my version is slightly different, I guess I could
 
Chrome automatically disables the script even when I force it to turn on for a session.
 
@EthanBierlein why?
@EthanBierlein I run it in tampermonkey
@Quill is this what you meant document.title = 'Desktop Notifications - ' + document.title.split(' - '); ?
or this
 
1:55 PM
Tampermonkey or greasemonkey run it fine
 
document.title = 'Desktop Notifications - ' + .split(' - ');
 
@Malachi Neither
 var title = document.title.split(' - ')[1];
 document.title = 'Desktop Notifications - ' + title;
^ Is what I meant
 
Anyone care to answer a "what would you do in this scenario" question quick?
 
@EBrown Code related, or life related?
 
Work/code.
 
1:59 PM
Sure, shoot
 
@Quill I see!
 
Nevermind, I just answered it myself as I was typing it out...lol
 
You're welcome @Malachi.
 
The problem, @Quill, is that I have a page in two folders in this project for work that is literally an exact copy of the page in the other folder. Like the only difference is a namespace name. Whenever I update code in one page (either, it doesn't matter), I have to update code in the other page.
It's required by a government agency as part of our product ordering process.
 
2:04 PM
@Duga It looks like the question is about design, not code.
"Really I was looking for a bit of advice on how I can design the database according to what I have mentioned above?"
 
This question probably belongs on CodeReview as the OP wants a review of working code. — Micke 13 secs ago
 
The only difference between the two is the namespace.
I was trying to decide if I should find a way to merge them or not.
The underlying problem is that if I merge them I have to redirect users back to whichever site they came from on the merged page.
 
@SirPython I got that one :)
 
@petethepagan-gerbil On Code Review, the OP would have to show the actual code to create the database, not just the architecture/design of it. As written, this question would be off-topic on CR. — Phrancis 46 secs ago
This question could be suitable for Code Review, as long as (a) your code works as intended, (b) your code is real code, rather than example code, and (c) your code is included in the body of the question. If you wish for a peer review to improve all aspects of your code, please post it on Code Review. — Phrancis 45 secs ago
 
these answers need more upvotes
3
A: World Generation for City Builder

maaartinuscreateWorld //use 6 instead of 5 to generate marshland int lastGroundTile = marsh ? 6 : 5; It's not lastGroundTile. It's not last and it does never get generated in world[x][y] = new Tile(new IsoPoint(x, y), IsoTileType.getGroundType(this.game.random.nextInt(lastGroundTile)), ZoneT...

3
A: World Generation for City Builder

Simon André ForsbergMagic values int lastGroundTile = marsh ? 6 : 5; ... world[x][y] = new Tile(new IsoPoint(x, y), IsoTileType.getGroundType(this.game.random.nextInt(lastGroundTile)), ZoneType.NOZONE); It would be clearer if you would initialize that lastGroundTile to IsoTileType.SOME_CONSTANT.getValue() Met...

 
2:13 PM
is fun!
 
@bazola Those answers are really good, much agreed
 
The question is really good, too
 
Greetings
 
Also, thank you for pointing out that this must belong to Code Review, I didnt know that existed. I will post this there. — Yatiac 53 secs ago
 
Greetings
 
2:18 PM
UNEXPECTED IDENTIFIER Greetings, EXPECTED ONE OF: SELECT, DELETE, UPDATE
2
 
@Quill When can we expect your first question in that language?
 
@Vogel612 lol
 
@Mast what level did you get up to before you posted a question?
 
@CaptainObvious This question was edited, is it fixed now or still broken?
@Quill The differential converter.
 
2:22 PM
@Vogel612 Select 'Monking' as `That should do it`;
 
I'm up to there, also
 
I completed another level after that before posting, but it's totally different.
Labels and stuff.
 
_____________________
| That should do it |
---------------------
|"Monking"          |
 
I've been tempted by the whole TIS-100 thing, but I have too many real processors to play with!
 
That ASCII art is was a bit off
 
2:23 PM
it's kinda hard to ASCII art without a fixed width font
 
Agreed, but there's a website to draw those for you
 
I've noticed that even when you post with fixed width font, leading spaces are trimmed.
 
@Edward I've never programmed a real processor with real ASM. Lowest I'd gone so far was C and VHDL.
 
@Edward Which sucks sometimes
 
@Edward hmm?? no that shouldn't happen. It works like a complete code-block in markdown.
theoretically..
 
2:25 PM
@Vogel612 He's talking about whitespace at the end of each line
 
No, actually whitespace at the beginning. Let me try it...
 
"leading" usually implies those at front..
 
                                                          nope
                                    look!
                                                                               nice whitespace
 
12345678
          x         <= should be under "5"
 
    8 Whites
            16 Whites
 
2:27 PM
To be honest I don't think this is a question for code review. The question is purely algorithmic, and comes down to whether the additional round of Fibonacci computations makes the password-hashing function significantly harder to reverse, which it probably does not. Reversing the Fibonacci step should be easy, because there are only 256 inputs for which results need to be computed and the results are both unique and large, which should make it easy to reverse the Fibonacci step once the final SHA-1 is reversed. — midor 15 secs ago
 
Try duplicating my little "diagram"
 
12345678
    x         <= should be under "5"
 
@EthanBierlein I haven't ever put anything onto Chrome Web Store
 
12345
    x <= is under 5
 
sorry
2
 
2:27 PM
Hmmm... Maybe it's the loose nut behind the keyboard...
 
@Edward Or you are using tabs
 
123456789
        x      <= should be under "5"
 
[ODBC SQL Server Driver][SQL Server]Incorrect syntax near 'Greetings'.
 
0
Q: PHP chunked file upload

Cyril N.I'm working on an PHP application that will allow (but not require) chunked file upload (from jQuery File Upload on the front side). I tried to find appropriate code and was only able to find the example from the JS library, that is, in my opinion, too bloated (it includes image resizing, etc). ...

0
Q: DLL to calculate Holidays in Germay

WiiMaxxi wrote a "simple" dll which is able to calculate all common holidays, but i would like to optimize the code in readability and flexibility federal state public enum Bundesland { BadenWürttemberg, Bayern, Berlin, Brandenburg, Bremen, Hamburg, Hessen, Mecklenburg...

0
Q: Laravel Exception Handler on a Switch

tomfordwebI am working on rewriting an application in Laravel 5.1. I am new to the exception handling technique introduced in 5.0. I have overlooked taking advantage of throwing/catching exceptions frequently in the past, but am working on this now. I am most likely not up to speed on some of the best prac...

 
I'm not typing tabs, but they seem to be getting in there somehow...
 
2:30 PM
How many spaces do you use?
I used 4
Then I licked on the Fixed font button
 
Don't lick the buttons.
7
 
How did the button taste? :)
8
 
Tastes like pixels
3
I need to check a doctor :/
I swear for my life that I read "clicked" and wrote "clicked"
A few weeks back, I was trying to read the chat messages and all the letters were in mixed case
Sometimes, I write "something", I read "something" and I notice 20 minutes later that there is saying "somethink"
 
hmm sexdaily???
 
@Vogel612 Dyslaexia
 
2:35 PM
which is an anagram and actually a common joke about that.
also it's usually written without a after l
 
lol
2
 
lol
3
 
I know, I wen't with the joke.
 
anagram you mean @Vogel612?
 
  much font           so wow
        many whitespace           such off-topic
  very code                                       much doge
 
2:36 PM
@Malachi FIFY :D thanks
not enough coffee, but my stomach can't afford another cup
 
@Mat'sMug isn't it like half past four over there
 
@Vogel612 I can drink it for you
 
it is...
@IsmaelMiguel help yourself, we put the cup under the muzzle and press the button
 
@Quill 10:37AM here, I had a whole 4.5 hours of sleep
 
Ah, okay
 
2:38 PM
@Malachi hmm. yes....
 
@Mat'sMug I went to sleep at 5am, only fell asleep around 5:30. I woke up at 8am
 
I just don't even.
 
@Quill LMFTFY
2
 
@Quill chat problem?
 
@Malachi Slightly.
 
2:43 PM
give me a second
 
Lets transfer this to the Nth Monitor
 
I think I got the bulk of them.
There's probably some others.
 
@nhgrif thanks
 
2:44 PM
 
but seriously BTW.Work
 
Did I miss a star-fest?
 
@Phrancis Somewhat
 
Not a star-fest.

 The Nth Monitor

Conversations that don't quite fit in The 2nd Monitor
 
This is hitting the review queue, should it be re-opened?
 
2:46 PM
No, my mistake.
It was edited and I posted it here with the question 'better now'?
 
@Quill no clue, but couldn't they have used a more descriptive name for these darn flags?
 
@Quill Probably reopen?
 
It's hypothetical and broken IMHO, but I'd like a second opinion on that.
 
Ugh, I just broke my HTML form :\
 
2:48 PM
PHP injection
 
Hammertime?
 
@nhgrif, what's your opinion (as first closer) on this?
 
@Mast hypothetical? maybe. Broken? maybe. off-topic for CR? Yes, since it's not asking for a review. It's a specific programming problem as such it belongs on SO, IMO
 
@IsmaelMiguel Probably something to do with JS, looking into it...
 
@Vogel612 Even after the edit?
I mean, it's not a good question, but for sake of scope understanding and all.
 
2:50 PM
@Phrancis If you need, you can ask me for help
 
@Mast especially after the edit
would be a different story if this was a special concern or something, but it's the whole point of the question
 
@SimonAndréForsberg have a I been doing the Pull Request thing right?
 
as such I'd send it over to SO, personally.
they'll probably try shoehorn it into CR again T.T
 
@Vogel612 True, that makes a whole lot of difference.
@Vogel612 Ah well, what do they know...
 
0
Q: Lockable doubly linked list

overexchangeIn continuation with this homework that covers Part I and Part II . Part III (3 points) Implement a "lockable" doubly-linked list ADT: a list in which any node can be "locked." A locked node can never be removed from its list. Any attempt to remove a locked node has no effect (not even a...

 
2:52 PM
@Mast problem I have with that is, it leads to frustration on OPs side
I don't mind about correcting a few more SO users...
 
@Mast Apparently enough to migrate a spotty question.
 
when I want my code pulled to someone else's repo, I am the Base and their's is the Head?
 
@Vogel612 TS
 
@Malachi izzat github PR? If yes, then no
 
@EBrown RSA
 
2:53 PM
Thank you sir.
 
@Vogel612 I am a noob when it comes to github....
it is github....
I want it the other way around?
 
base ~= target, head ~= source..
IIUC the button is doing a:
git merge head --into base --no-ff
 
okay thanks
 
base is the base, head is the head
head is the progress you made
 
I seriously need to get some work done now though. I updated the repo. and I updated my answer, on my own question.
 
2:56 PM
so base is the other repo since that what you base yourself on
and head is your local repo with how far you got
I'm off, time to go buy new glasses
 
later
 
AOL goodbye sound.
 
and now I have 95 more first post reviews until I finally get that elusive gold badge
 
@Vogel612 Why don't they just call it that...
 
because it's not exactly target and source either
 
2:58 PM
GitHub is to terminology what Programmers.SE is to scope.
 
Git has like it's own language in that regard. You push, pull, commit and nobody is any wiser.
 
@Mast meh. sure git has it's own language
that kinda was the whole point of it
 
In that neither of them use what you would exactly expect.
 
because it's not SVN it has a different language
 
I've always preferred GIT over SVN for some reason.
I find it easier to manage.
Of course, TFS > GIT all day long.
 
2:59 PM
SVN is slow, slow and slow. Also it's centralized and doesn't allow offline working
 
In my opinion at least.
 

« first day (822 days earlier)      last day (3194 days later) »