« first day (1180 days earlier)      last day (1346 days later) » 

2:00 PM
@Pimgd lol IKR
USR_Initial | char(1) | YES
what initial?
middle initial, it's usually shortened to just initial on most forms or MI
what about first initial?
most forms tend to fill out in this format from my experience
> First Name: Last Name: Initial (optional):
2:03 PM
Here in the Netherlands we have a lot of people whose names tend to look like "FirstName from TownName"
e.g. Brienne of Tarth?
@Mast Nvm, I figured out the linking problem. On Windows anyways
For example: Frank van Heeswijk
where do I put the "of"?
2:04 PM
@Pimgd Well, at least it's not "from Llanfair­pwllgwyngyll­gogery­chwyrn­drobwll­llan­tysilio­gogo­goch"
Though I don't know if my surname is really town related in the end
@Zak please record yourself reading that one out loud =)
@Pimgd US location is secondary identity. Your full name is primary, so Tyler M. Throckmorton
USR_CanCreateUsers is at the wrong level of abstraction. There should be a separate table that holds user privilege levels / roles. don't store individual privs as individual columns in your user table, you'll have nightmares when the privs need to change
Weird, I don't get any rep associated with upvotes on this topic: stackoverflow.com/documentation/c%23/24/c-sharp-6-0-features/46/…
Even though my edit got accepted
2:08 PM
@Mat'sMug best way to store that? currently the only scope that this project contains is specifying if someone is a manager
And I know more upvotes have been applied since then
then have a separate "UserRoles" table with "Unspecified" and "Admin" or "Manager" roles, and associate a user to one or more roles
then when you need to implement new privs, the fact that they can create users is an implementation detail of the application that consumes the data, not a concern of the data itself
composite key or create a AI id for that table?
Algum tuga ?
depends if a user can be assigned to more than one role
translate: algum tuga
(from Portuguese) some tuga
@SaPires welcome to Code Review chat
2:11 PM
some portuguese people ?
down the road maybe, but right now an Admin would have all the perms a Manager would
aye. but as it stands the ability of a manager to reset a user's password would depend on a database field labeled "CanCreateUsers"
@syb0rg too minor, they fixed that
@Pimgd Oh, I guess I didn't see where they said that
Or better: a manager's ability to rename a product would depend on a flag named CanCreateUsers
2:23 PM
Q: Image input output in Java

Jobayer sheikhIn this code I have taken an image as input and output the same image. As far I know if two images are same then their PSNR value will be inf. So I calculate their PSNR value using MATLAB but it shows 48.05 that means those image are not same. But I read and write the same image, why this is happ...

derp of today: print the days of the week
@Mat'sMug what would you think of having mailing_list as the root user object and then creating users (those that have access to the app) from mailing_list objects
this means that users doesn't need name or username or email, just a pw
<div data-ng-repeat="day in _.range(7)">
  {{(day + 1) % 7 | moment: 'dddd'}}
from Monday to Sunday
But they all said Thursday....
how come?
Well, moment filter takes milliseconds ofc =)
And 1970-01-01 is a thursday
2:25 PM
@Trojan404 depends what your needs are..
@syb0rg Was just about to test it :-)
@Mast Linking problem was in tritium actually
Now I need a Linux test for it
Cause I can get Windows to work
This may fit better at codereview.stackexchange.com — James 52 secs ago
2:37 PM
But I don't have access to a proper linux system for testing
Only way I can test it is by pushing and seeing how Travis handles it lol
I do.
It works, but it clutters my build history
@syb0rg You could fork you original project and put Travis on that if you want to preserve your build history
@Mast Looks like this tritium build will succeed: travis-ci.org/syb0rg/tritium/builds/147776873
The same thing I did to fix tritium linking issues doesn't work for Khronos though
Odd... they were almost identical issues
Guys, I have a question. How would you handle fine-grained access control in a UI? Say a user should only be allowed to view a certain page if he has a certain permission.
Right now, we hard-code that requirement on the client side - if user.permissions has 'view-this-page' for example
but this is a 1) magic string that 2) implicitly couples the client to the server implementation.
2:49 PM
@DanPantry Use a permission model like an OS does.
Where instead of files, you handle pages/directories/etc.
The main thing is that we want to be able to split client/server model in twain and this is one (big) source of coupling.
Unfortunately that's not really possible - some of the business requirements are very fine-grained indeed.
For example, some users should be able to edit a phone number of a non-customer, but not a customer.
Ah, the ol' linking out-of-order got me
Let's see if I can do a full Windows build now
And of course, all of these permissions are stored in a database because they need to be assigned to users, which makes it difficult to share them
And also means they are hardcoded on the server.
You know, I'm thinking the problem lies in the fact that the data, server and view layer all have implicit coupling on each other..
Then you need to track which one was tapped, store it in a class property (self.outletView or otherwise), so it can be removed from your removeTags method. You haven't given enough context, so you're responsible for fixing up that part yourself. THe answer was just to help you make a proper UIAlertController and also to remove the redundancies regarding isKindOfClass and .contains. The rest you're responsible for, unless you want to post the entire class code in another question. Probably best for the code review forum to get an overall critique. — BaseZen 23 secs ago
I'm not the one who downvoted this post but you should know that asking questions in answers is not considered appropriate on SO. Normally, I'd suggest you ask a new question (because editing an already-answered question is not okay) but you are asking for a code review, which is off-topic for SO. You should check out codereview.stackexchange.com, see what their requirements are for posting questions there and perhaps post a request for a review of your code there. — Louis 33 secs ago
holy large comments batman
2:58 PM
IMHO, using one controller is enough and controller creates the splitter window (main panel) + other panels (views). One controller multiple views and multiple models seem to be enough to handle your case. You should create a working code and ask this question in codereview.stackexchange.comozy 14 secs ago
You could at least make the permissions inherit from each other
so it seems the solution is to use claims based authentication, which makes sense
The main problem right now is that permissions can be added (or removed) at any time and are not defined
If we had a well-defined set of claims that would make things easier, though permissions are basically claims...
define them then?
Well, that's the problem, there are over 500
This appears to be more fit on code reviewk0pernikus 11 secs ago
3:01 PM
And they're all stored in the database and may change at any given time
Because the business wants the ability to revoke permissions from a given role at any given time
Though making those permissions well defined does seem like the right answer
Tell an user to call your boss, your boss then gives out a 12-digit code, the user enters that and has permission for that one action
I did no know that there was a code Review, Thank you i will post there and erase here. — Nuno cruz just now
I somehow think my boss would be less than pleased with this scenario.
you authenticate the user for each rest call
Welcome to web
web is stateless
The REST call isn't necessarily the issue, although we do have to hardcode the permission there too ala [Permission('some.permission.name')]
the issue is that the UI is littered with <div permission='some.permission.name'> in many places
3:04 PM
Yes, you duplicate permissions... for display logic
the main issue that was posited is that if we were to version client & server separately, adding a permission would require making a commit in two different repositories
... yes.
I have a solution for that, too
You're... really not going to like it
is it "Don't version the client and server separately"?
How does HATEOS solve that issue?
Basically, REST++#+#!!!
You get your view elements from the server =)
Ah. yeah. I don't like that.
3:08 PM
well, you as a client have to position them still...
but you get a list of URLs you can access
Yeah.. unfortunately it's not as a simple as "you can view this page"
it gets right down to "you can view this page, but not this element on this page"
their example snippet:
    "_links": {
        "self": { "href": "/orders" },
        "curies": [{ "name": "ea", "href": "http://example.com/docs/rels/{rel}", "templated": true }],
        "next": { "href": "/orders?page=2" },
        "ea:find": {
            "href": "/orders{?id}",
            "templated": true
        "ea:admin": [{
            "href": "/admins/2",
            "title": "Fred"
        }, {
            "href": "/admins/5",
            "title": "Kate"
    "currentlyProcessing": 14,
I think you can sort of see how you can bash various flags into this setup
I ... don't recommend this path
if you ever wanted to build a completely different view, well, that can't be done
with a regular REST api you'd just make multiple calls and build your own page
Woo, got a bounty
This would be a lot easier if the server was in javascript and the permissions <-> roles didn't have to be changable at runtime
The alternative is .. a tiny bit of duplication
which is what you're complaining about right now
3:16 PM
@DanPantry Well, you said he wanted to have ultimate control
Q: parsing a table with jsoup

AAAi'm trying to extract the e-mail adress and the phone number from a linkedin profile using jsoup. I have written a code but it doesn't work, the code should work on any linkedin profile. Any help or guidance would be much appreciated. ` public static void main(String[] args) { try { St...

@CaptainObvious Bern
If you don't have an explicit question and would like a code review on functional code, I believe you would have better luck over at codereview.stackexchange.com =) — Hodrobond 54 secs ago
3:35 PM
That low-hanging fruit turned out to be quite sweet
Q: Project Euler Problem #4 Ruby

Sakamoto KazumaI've solved the Project Euler Problem #4, but I'd like some tips as to how to make this more efficient. I am a beginner to Ruby, so please be nice about the stupid stuffs (but still tell me about it). class Euler4 def isPalindrome(n) n == n.to_s.reverse.to_i end end puts "Setting Vari...

Edging close to .5alpha release: github.com/syb0rg/Khronos/milestone/1
3:56 PM
Anyone want to try building on 64-bit Windows? github.com/syb0rg/Khronos
Looking for feedback on instructions and how the build works for you guys
Visual studio or mingw?
You could try a visual studio build, but I'm pretty sure it'll break... I'll test that now
MinGW compiled and worked for me
I'll give it a shot after work
is there any way to bookmark chat messages so I can come back to this later?
@jrh Yeah.Click the arrow next to the link and press the permalink
I guess that works, though I'll be on a different computer, maybe I'll do the lazy thing and just edit the link into my profile
4:12 PM
Q: Recursive Implementation of Merge Sort C++

user3508551I am currently reading an algorithms book and I read on the insertion and merge sorts. I implemented the merge sort in C++, The first function MERGE is responsible for the merging of the two subarrays part and the function MERGE_SORT is the actual algorithm. I am interested to know whether or not...

@jrh So far it's failing for me on VS, dunno how hard the fixes would be...
Maybe once you test it yourself make a Github issue if it fails for you as well
@CaptainObvious Lippert answering a Ruby question...?
@Phrancis Monking!
@syb0rg I refuse to install MinGW on any of my PC's.
@EBrown Why's that?
4:24 PM
I just do. I don't need more crap on them...lol
@EBrown Do you have VS?
@EBrown You could try building it with that, if it fails open a Github issue
Hello @BernardMeurer
Hey @syb0rg!
Are any of you folks familiar with Jekyll and/or rails?
I can't for the life of me figure this web stuff out
@jrh Do you see the Room {down arrow} link on the right?
Click that and bookmark a conversation.
4:33 PM
plox am dead
What is plox?
Q: Google Codejam 2016 Round 3 Problem A

Amndeep7I'm working on learning rust by completing a variety of coding challenges, such as the Google Codejam problem stated in the title. I completed a python3 implementation that I liked, which I then tried to port over to rust. To my surprise, the python implementation appeared to be considerably fa...

Q: Insert a Node at the Tail of a Linked List

ClefairyI've solved this question, but have a small question. In the while loop we check if (temp->next != NULL), why wouldn't work if we check (temp != NULL). Isn't it the same, both checks will get us to the end of the linked list? Also any code review is appreciated! You are given the pointer to t...

Q: Exercise to create an insertString function to linked-list. Seems too simple. Am I missing something?

Matt ClearyWorking from 'Programming in C' by Kochan. I'm on an exercise in the chapter 'Pointers'. This was the exercise: 'Write a function called insertEntry() to inset a new entry into a linked list. Have the procedure take as arguments a pointer to the list entry to be inserted (of type struct entry a...

Q: ListBox with a dynamic number of TextBox elements

Michael Brandon MorrisI am making a kind of form, and I want the user to be able to enter a dynamic number of string inputs. The idea is that a single TextBox will be displayed, and once the user has filled that out, they will be able to add another one, and repeat the process as they keep filling the text boxes. Once...

@syb0rg is that even real language? Google Translate didn't recognize it
@Phrancis Nope, I looked at Google Translate too
Just garbage, probably a bot
Ah ok
COBOL is kinda scary
Apparently, some of the words are Estonian...
@Phrancis How?
4:51 PM
A: Get host ip address behind load balancer or without lb

Tolani Jaiye-TikoloA big Shout Reference types by default have values of null e.g string and object. object o = null; string ipAddress = null; Please don't do the above object o; string ipAddress;

I know someone who knows COBOL.
Or at least, I knew them. Haven't seen them in a couple years.
@EBrown ...
@EBrown A big Shout...?
Either way, it's a bad answer
4:55 PM
That answer is borderline pedantic
@DanPantry oi
@Mat'sMug tfw you earn under half of $86k even after adjusting for exchange rates
I'm not sure what to think of this
Q: Optimize code for proccessing a string with foreach

LuchezarI have a variable containing a string in this format "Size-XS|Size-XL|Color-Red|Color-Green". When i process it the final result is "Variations: Size: XS, XL, Color: Green, Red. The code for this is like below. $variations = explode("|", $search_db_row['variations']); foreach ($variations as $v...

I suppose the SQL documentation topic was not defined specifically, and ended up being a SQL Server/T-SQL topic
Even though such a topic already existed
Guess I'll bring it up in Documentation chat
5:15 PM
@Phrancis I guess he's requesting Oracle documentation.
I learned that the SQL tags on docs are a mess at the moment, talking with bluefeet and others about it
@syb0rg Oh goody, I still don't have 99 flags a day on CR.
77 or so on CR, 100 on SO.
Q: Verify if user has at least one of required roles to be able to update a record owned by a certain user

Francis DucharmeI have a Microsoft CRM 2016 plugin that checks if the user that triggers an update message has at least one of the required roles, when the updated record is owned by a specific user. Here's the code: public class CheckIfOwnedByPool : BasePlugin { public CheckIfOwnedByPool(string unsecure, ...

5:36 PM
So it's a code review? — takendarkk 51 secs ago
Documentation just before vacation
@Phrancis That is an understatement. Docs is a total mess ATM.
Q: Ribbon animation code too repetitive

Lukindo MbuliI spent the last two days getting a ribbon animation to work with divs so that I can later add li link elements to them to act as a menu. I used the progess bar animation code as inspiration from w3schools. The animation works great, only issue is that the code is very un-DRY. I tried to simplify...

@Hosch250 Yeah...
Is your code working? If so, then please submit to the Code Review stack exchange site for suggested improvements. If it isn't working, please give a minimal, verifiable example of inputs and an explanation of exactly what is going wrong and where (including a full backtrace if any). — TheBlackCat 9 secs ago
It is working now, I will submit to the code review site. — xxx222 31 secs ago
5:46 PM
@CommitStrip That's the kind of crap giving away people comment for the sake of having comments. Automatically checked code is riddled with it.
@Phrancis At least there's active people like you trying to fix it, good work!
Thanks :)
Crap. I answered a SO question in the comments. Now I'm missing points again.
Talking about which, I should start getting some points here or Zak is going to nail my behind.
sudo get-me-a-python-zombie
possible answer invalidation by ultra on question by ultra: codereview.stackexchange.com/posts/135874/revisions
@Phrancis C tags are also a mess
Possible future logo for Khronos, thoughts?
6:09 PM
@syb0rg It's sharp, I like it
What's the question? There's another site for code reviews — KABoissonneault 46 secs ago
@KABoissonneault Code Review is for working code onlysyb0rg 54 secs ago
@learning Are you talking about those online code competitions, where your code gets run against a bunch of tests but you don't know which? Isn't there a platform for code reviews there? — KABoissonneault 41 secs ago
@StackExchange @Pimgd Good meta question. My response:
A: Should votes to close a question as containing broken code be paired with a comment?

200_successAs the moderator involved, I'm obligated to respond. This specific question I have to admit, it was a complex decision process for me, with many factors to consider. Code Review is a place where programmers post their code for feedback… … subject to a condition that the code must work as inte...

Q: Passing variable to BackgroundWorker and use the same value later

FreddyI create multiple BackgroundWorker within a for-loop and each of them needs to know a special value. To simplify, it is just i in this example. When the BackgroundWorker is finished, I need to read that i again. I thought of subclassing BackgroundWorker and creating a class MyBW for that purpose ...

Q: HTML structure for website

5h3z4nI am fairly new to coding and currently trying to write as much as I can get my hands on. I started off playing around with templates but now I've decided to go without and therefore I am sure there is plenty for me to improve. Now I am not sure if I am right on stackexchange but I'll try anyway...

Q: Game engine code

creekorfulI'm currently working again on my game engine CreekEngine. I wrote the engine to use the SFML library as graphic and audio library. I need some review on my engine. Can someone tell me what's the good and the bad point of my engine ? Source code available at : https://github.com/creekorful/CreekE...

Q: Similarity research : KNN using a linear regression to determine the weights

mitsiI have a set of houses with categorical and numerical data. Later I will have a new house and my goal will be to find the 20 closest houses. The code is working fine, and the result are not so bad but it is way too long. With a sample of 10 000 houses it takes 6 minutes. My actual dataset is abou...

6:29 PM
@syb0rg Shiny.
I'm exhausted, but got the day off tomorrow. I'll definitely give it a shot :-)
This question is better suited for codereviewjuanpa.arrivillaga 26 secs ago
Tried compiling with make -j, froze computer
Q: Pagination from resultset for JTable

Jan444444I am trying to create simple app, where I need a pagination for my JTable. I want have there buttons with number for all "pages" in my JTable. I have code here: Class Customer: package customereditor; public class Customer { private int ID; private String name; private String surn...

How is it going?
Q: explode list of lists to separate lists in python

ArunI currently have a list of lists like L = [['E2', 'C1', 'A1', 'B1', 'C2'], ['C1', 'D1', 'A1'], ['C1', 'C2']] My aim is to compare L[i] against L[i+1] to make sets. For example, L[2] is a subset of L[0] so I would eliminate it. My two different list will be L[0] and L[1]. For this, if I can som...

This is off-topic for Stack Overflow - you should post your question on Code ReviewMacro Man just now
I'm voting to close this question as off-topic because this question belongs on Code ReviewMacro Man 29 secs ago
7:11 PM
@DanPantry what's TFW?
Comparisons on i == j will break the algo. Perhaps I'll try code review. — Floating Point 29 secs ago
@FloatingPoint I don't recommend that, Code Review is for working code only; you're post will be closed if you post it over there since it doesn't work as intended. — syb0rg 50 secs ago
7:37 PM
Q: c++: Library for manipulation of binary protocol headers

Ambroz BizjakI'm starting with implementing a TCP/IP stack for embedded systems which will be done in C++ and I've found I need a good way to work with protocol headers involved (e.g. ARP, IP, TCP). Major requirements are: Portable, C++(11) standard compliant (e.g. no structure packing, independent of CPU e...

Since your code is already working, consider asking these types of questions to Code Review - Stack ExchangeBryce Drew 13 secs ago
based on Stack Overflow's nice Calculator I am thinking that a lot of people are going to be asking for a raise....
Doesn't the average move up then? Resulting in asking for a raise again next year?
Hello @cdkMoose
@skiwi that is what causes inflation. so the answer is "of course".
@syb0rg you should tag those comments as not constructive. the ones that suggest Code Review when the code doesn't work.
7:49 PM
@Malachi Oh, good advice... thanks!
possible answer invalidation by Freddy on question by Freddy: codereview.stackexchange.com/posts/136092/revisions
8:05 PM
Anyone interested in documentation, just passing along the message: Documentation should actively reject pledge to “versioned” tags
Q: C++ While Loop Function Using Recursion

Archie GertsmanI was learning about recursion and how supposedly any loop could be made into a recursive function. This had me interested, so I tried making the standard while loop into a recursive function. Here's what I came up with: #include <iostream> #define COND(a) [&] { return a; } template<typename C...

Q: SDK Login & Web Classes

basicCurrently I am writing an SDK for use with an existing API. Primarily I am seeking input on whether the way I am writing this code is efficient and if not what steps can I take to streamline the code. This SDK will be imported and used in Android so I am trying to use libraries that are already i...

@Phrancis Cool, and should be aliased to
@syb0rg looks like that has already been done, merged into C language
8:20 PM
Ripe zombie; open question with answers, at least one answer having score 0, no answer having score > 0: Methods to check form validity and to count invalid form fields
Exactly 1000 rep :D
Got 800 replies on a post i posted on reddit fun.
in VBA Rubberducking, 11 mins ago, by ThunderFrame
@Comintern Oh really? @Duga seems like all talk to me. I can't even remember her last commit.
in VBA Rubberducking, 1 min ago, by ThunderFrame
@Duga just PM'ed me and asked when my last commit was. :-/
8:37 PM
Q: Interview solutions to reverse a string and reverse a sentence

terminatorRecently in an interview I was asked to write method to reverse a string. I used StringBuilder but was asked not to use reverse method of builder but iterate over the string. Next was to reverse a sentence. Following is the code I wrote and I got reject from interview. Would appreciate any ...

Q: Inner function accessing variables directly from outer function scope - What are the drawbacks?

Senthil KumaranI saw this snippet in a code that I am working on. And I feel that accessing the outer function variable directly in the inner function brings some undesirable magic. For e.g. when I read the function, I assume that the variables I am manipulating in that function is gotten from the parameters d...

Q: Program to create an doubly-linked-list. Why does my code work? Am I missing something?

Matt ClearyI'm working through the exercises in the 'Pointers' chapter of 'Programming in C' by Kochan. I have written a program that creates a doubly-linked-list. It first prints the values. It then proceeds to call a function to remove an entry. The values are printed again. Finally, an additional funct...

Q: Binary to decimal converter in javascript

topleftExercise with test suite from http://exercism.io/exercises/javascript/binary/readme. I did not intend to use ES6 features, it's plain old javascript. That's why I seek advice more on the good practices, performance side, than modern syntax. Basically anything to make this code more elegant, witho...

@CaptainObvious "Why does my code work?"
@Mat'sMug that feel when
8:57 PM
alternatively: "the face when"
unrelated: I have three recent-ish answers (one from this morning) at 0 votes now. ..
1. this is a better question for codereview.stackexchange.com 2. When you do, DO NOT post picture of your code and example data. Paste them in the post then highlight them and hit Ctrl-k to format it. — Scott Craner 27 secs ago
@Vogel612 same :\
I put a lot of effort into that c# answer but NOPE
Q: Telegram Rest API client design

fnurglewitzI'm working on a "framework" for Telegram bots and right now everything "just works". I'm now in the process of rethinking about what I wrote and one of the things i dislike a lot is how I implemented the API client. Right now I have an interface (TelegramBotApi) which maps every api endpoint to...

@DanPantry hmm.. not so sure about the C# answer. it seems to be missing the point somehow
9:08 PM
I'm voting to close this question as off-topic because this question belongs on codereview.stackexchange.comScott Craner just now
9:22 PM
@Vogel612 You seem to post short answers (which in itself is not neccecarily a bad thing) on long answers. Those seem to in general not get a lot of votes since, they only scratch parts of the question.
@N3buchadnezzar I dare challenge you to write a longer answer without getting into design and motivations of the respective questions' code :)
@Vogel612 Well, that is up for review too.
But perhaps that is what is demanded / needed? Along with some code to show the changes proposed.
Or is there a new site policy I'm not aware of?
@Malachi Nope, not quite. That is what inflation causes (or should cause).
Inflation is caused by more money being put into the economy from anything, whether it is the government printing more or banks lending more or people spending more and saving less.
That means there is more demand for any given product, which results in prices being pushed up so sellers can both produce enough to meet the demand and to reduce the demand so they don't have to produce as much.
That results in wages being driven up (labor is a product, just like ice cream, meat, and potatoes (my economics books' favorite products)).
Only, wages often don't rise enough to keep up with inflation, which can lead to poverty in lower-income households.
Extremely complex and relatively poorly understood since economists can't just do trial/error experiments like most scientists, but extremely interesting all the same.
My apologies on the poor posting etiquette. This is my first post here, in the future I will format the code so it can be copied and go the site mentions by @scott cranar for code reviews. — zanwigz 28 secs ago
@zanwigz fix it here. Do not post it on CodeReview as they will see it as not working. See my answer below. — Scott Craner 23 secs ago
9:41 PM
@Vogel612 merry xmas (I did an edit on one of them, btw, hope it's oK)
wonderful edit :)
Good answers :)
thanks santa
@N3buchadnezzar did you mean long questions?
@Vogel612 I feel you've been channeling a monkey using ellipsis for ... sarcasm :)
9:43 PM
Yeah, sorry about the brainfart.
@Phrancis ...
@Phrancis ... No? /s
Sorry, that was intended at Vogel
Still funny
Pimgd loves his ellipsis too ;^)
Anyway, @N3buchadnezzar, as part of the whole zombie killing effort we had the whole teamwork idea... everyone can post an answer if it helps
even if it's short
9:46 PM
Short answers are certainly better than no answers
Q: Jack of All Trades, Master of None - Let's work together to offer ultimately better content, faster

ViziionaryNhgrif pointed out a great idea: Teamwork "I think it's probably best if the question instead has several good answers that each address a specific topic. The result will be that no single answer is complete, but every problem is addressed between all the answers." Alright, so that ...

Yeah. I am not saying it is a bad answer in any way. All answers are good. However some type of answers are more prone to receiving upvotes than others. Upvotes and the goodness of an answer are not always in synch.
and this one
Q: Short answers and code-only answers

ChrisWWhat should we do with: Short answers (for example, "I suggest you use [hyperlink to this standard API] instead.") Code-only answers (for example, an improved version of the code in the OP) Such answers could be improved (e.g. by adding an explanation of why the suggestion is helpful). Is it...

Really depends on the question though, and also how much time you have to dig into the code. Even in real-life/work settings, there's not always time for deeply reviewing code
Especially when it comes to the philosophy behind the code, which is more of a design review
I pretty much have 2-3 review modes
mode 1: Merging your pull request
You're deviating from the style guide hereee... and this loop can be simplified... and... this comment has a typo
other than that, merge.
9:49 PM
@Phrancis A good review might be: For the love of god think about the children and stop what you are doing.
mode 2: Algorithm review
@N3buchadnezzar Yeah. Sometimes a little tough love is the best answer, even if the OP doesn't like it
Basically... Your algorithm is wrong, here's how to fancy math, big O, blah blah blah, look, it's a lot faster
and then rarely there's mode 3 when I've gone off the rails and decide OP needs a lesson about programming paradigms and we explain half of OOP along the way
@Pimgd Ye. Level 3 is really not needed if the OP has no idea what they are doing.
and "mode 1" reads like a bullet list, "mode 2" can read like a structured story, and "mode 3" is... well, a chapter from a book
9:52 PM
I usually try to not only do "mode 1", but I guess it's the same for me
Most of my answers are usually between mode 1 and 2, I'd say... usually if the only things I have to say are stylistic in nature, I don't usually bother answering
Well there's various levels of content framing quality to it as well...
> code
Is the laziest form you can have; you can actually try turning it into, I dunno, words
I like the code bit, makes it easier to digest. Coupled with some links and thoughtful comments.
rather than a poor man's version of line by line comments
@N3buchadnezzar true, but there's advantage in linking your points together and grouping them by common theme and basically showing someone how and why this makes things better... bonus points for stacking fixes in one area and then showing the final result
that's better than, uh
A human lint tool
9:58 PM
Because the expected utility (or reputation) from closing a question after you spot a bug in it within the first minute and then moving on to another question beats the expected utility from answering anyway, permanently marking the question as a bad one (no editing the code after getting answers!), limiting the upvotes you could get? — Pimgd 3 mins ago
What exactly are you trying to argue?
(Sorry, I only have a few minutes before I need to go, but would be glad to continue discussion later.)
I usually do something like:
"This code:"
//some quoted code
"Would be better written as..."
//some new code
"Because... [add explanations/links/stuff]"
That it's faster to just close the question and either let OP fix his bugs by himself (and then we can have a proper review)
or OP can just... not fix his bugs and that's fine too, but it'll stay closed
That's what I did at first: I slammed it closed.
@Phrancis Agree. Much better than You are doing X here, and that is wrong.
and asked whether the author tested it for correctness.
10:00 PM
this prevents the case in which people write reviews on how you could improve the structure when basically the algorithm was flawed from the start and that's why it fails for any input
hmmh lemme look at this again
unused code isn't obviously broken; but that's a tough argument so I'd be willing to say you can argue it is....
unused code as in dead code?
> I've held the position that reviewing should be done in answers rather than in comments. A bug report constitutes an answer.
This is what I'm arguing against
My remark about the exceptions turned out to be a red herring.
if your review is "your code is buggy and fails for all inputs" then... it's basically broken code, right?
I want to prevent this
A: "Cows and Bulls" game

PimgdFirst thing, let's clean the comments and indentation, because what you have right there is just unreadable. First, fix indentation... // Check if we are not allowed to include duplicate characters: if (nodupes === true) { // True if character already used: ...

What if the code is broken because of a single missing parenthesis, or a another similar small bug which completely breaks the code?
10:03 PM
but then with more obvious bugs
Look, what I did last night was one way of handling it. Like I said, in a different mood, with different timing, or slightly different degrees of brokenness, I might have done something different.
We're all humans here, after all
@200_success I think the way you handled the original question is defensible
I'm not arguing for or against anything. I'm pointing out that its complicated.
I am arguing that it'd sure be nice if people leave a comment when VTC broken code based on the code
10:05 PM
Sorry, gotta run. I'd be glad to continue discussing in about 90 minutes.
okay =)
@200_success I live in Europe though; so maybe I'm not available then (0:07 atm)
@keiv.fly I just editted to include the code.@Comintern I changed the loop to run the other way with the Step-1. I am running it now, however, it still seems slow (around 8 percent done after 10 min). If it works I'll hop over to codereview to get some imput on improving the speed. — zanwigz 37 secs ago
Q: Eliminate redundancy from session authentication

KriiI have a session authentication script and it works, but I can't find a way to eliminate the redundancy where the two database queries are. One checks if the cookie has a corresponding entry, and the other retrieves data based on the entry. $con = new Database(); if(isset($_COOKIE["session"])) {...

10:21 PM
in VBA Rubberducking, 8 mins ago, by Hosch250
2.0 hit 95% done: https://github.com/rubberduck-vba/Rubberduck/milestone/20
10:42 PM
Q: A dice roller in node.js

mcdustinI knocked out a dice roller in 2 days. I think this is the first coding project I've ever actually completed to a degree where I'm not embarrassed to post it. This is my first time working with objects, sets, and recursion. It took a lot of trial and error and it's not the most stable (bad synt...

@DanPantry : Woe unto me
Why, what's up?
I added the documentation entry for sp_send_dbmail

« first day (1180 days earlier)      last day (1346 days later) »