« first day (705 days earlier)      last day (3610 days later) » 

11:00
I don't understand why there is a question at all now. Does the code work? If yes, then there is no problem, now is there? "Is this a good way to do this" falls into the realm of "opinionated", and we don't like opinionated questions on SO. If you would like a Code Review, you need to go elsewhere. — cimmanon 44 secs ago
@SimonAndréForsberg On for the gold badge?
@DanPantry I don't think there's anything to support from the Identity side. OWIN takes care of all that: it does all the OAuth handling and uses the Identity framework to verify users and stuff
@skiwi that will take quite a while... but I guess if I keep it up, it's only a matter of time before I will get the gold.
@JeroenVannevel Oh, cool. Well, as long as I have the endpoints I'll leave that to you..
@JeroenVannevel you will likely have to do calls to the provider for their name though, not sure if OWIN does that for you. See Twitch for an example
^ Registration endpoint
@DanPantry Alright, I'll look into that
it's /account/registerexternal for an external endpoint
Let me write this down somewhere
11:06
Does anyone have experience with installers for Java programs that let you configure multiple things? Including downloading the JRE if missing, have an application automatically start-up (under Windows), and creating an updater?
At my work, I use winzip self-extractor for update patches.
Advanced Installer is what we use for installers, but I haven't used it yet.
It looks like in this regards C# would win over Java :(
In what regards?
Deployment to users, pretty much
11:10
Hmm, maybe. What if they don't have an up-to-date version of .NET?
@skiwi I saw that
@nhgrif Yeah, that's the funny thing, C# relies on a framework as much as Java does, but it's by default bundled with Windows :|
If it's not up-to-date they need to update it as well, that's true, but generally still less of an issue
yes, but it also had updates and not everyone gets updates.
Create a Windows Installers that downloads and installs .NET updates and no-one gives a damn... create one that installs Java and everyone will panic
That's where Swift wins. You just check their OS version and run applicable code based purely on OS version.
Framework doesn't receive updates independently from OS.
11:13
What if you always code using the latest version?
Of Swift?
Yes
May be a bit exaggerating, but using the newest version of a language/framework will most likely reduce the number of bugs and save on development cost
If I have an app on the App Store for OS X 10.10, and I release an update that requires 10.10.2... the 10.10 users won't receive it but their version will still run.
But it's also quite easy to add code that checks OS version and runs one version for 10.10.2 users and another for 10.10 users, then everyone can get the update.
You have a target OS (can use code up to that version), and a minimum OS (user's OS won't let them download/install)
11:16
Take Java 8 as example, it added lots of features which I'm using to program, therefore I need the users to run JRE 8 minimum...
Would in such a case your software not be available using Swift on older OS?
if I set OS X 10.11 as minimum req. version, no one with anything less would see my app, be able to download it, or be able to install it.
Actually, I can do this for any project in Xcode, language is irrelevant.
0
Q: how to define constructor in activity with arguments and start activity in android?

Programmermy code is this: public class Spinner_Name extends Activity { List<String> listSp; public Spinner_Name(List<String> list) { listSp = new ArrayList<String>(); listSp = list; } Spinner sp1, sp2; // @Override p...

And I am pretty sure Xcode can do Java. But OS X version implies nothing about JRE version.
-1
Q: Sql Query not working on both condition in where clause?

kls Declare @Pattern varchar(100),@Query varchar(100) set @Pattern = 'Abstraction' SET @Query = 'SELECT QuestionID,Question,TotalMarks,IsActive FROM Questions WHERE SubjectID = 3 AND Question LIKE ''%'+@Pattern+'%''' EXEC(@Query) If I remove any condition in where t...

11:38
@JeroenVannevel why does the external login require a username? :S
Ah right, the registration?
I didn't change the implementation I had. I'll (try to) make that optional though
So you can consider it as not-required
@JeroenVannevel I'll write the UI first - then we can work out what's required. I don't think it will be but I'm not sure on how you would get a platform independant user ID.
unless you had a DB column called facebook (for example) that contained an ID for that user profile
User Ids are in the form of a Guid, auto generated
@JeroenVannevel I mean from OAuth
obviously when you have someone log in with oauth they don't 'have' a user account with you per sé (not by default) so it's up to you to link the oauth user id to some user data
Monking!
11:42
But I'm not sure how OWIN handles that. THat's how the case is in Node
monking @Unihedro
@DanPantry Mmm I'll look further into it
Maybe this clarifies things though: bitoftech.net/2014/08/11/…
That's the blog series I followed to get it all up and running
I'm voting to close this question as off-topic because it belongs on code review, not stackoverflow. — tiago 39 secs ago
It also shows how the API is called from JS
@JeroenVannevel reading now. the external login mapping to domain details si what i'm confused on
11:49
0
Q: developing video player using c++ and ffmpeg

user69980I would like to develop video player using c++ & ffmpeg, any open source lib available that could be helpful to develop player (mainly av sync).

my word that was a lot to digest.
@Vogel612 I didn't suggest that the question is migrated in its current form; I simply pointed out that there is a Code Review site, which expects questions to adhere to the requirements outlined on the linked page. — GoBusto 1 min ago
12:10
Code Review has over 2,500 questions tagged with [performance]. — pnuts 1 min ago
This might be better on codereview.stackexchange.comroryap 41 secs ago
^ both seem to be fine
12:22
@Vogel612 another alternative is to answer one of them on SO:
0
A: Should I use static method (C#)

Simon André ForsbergWhat you have here seems to be a version of the Static Factory Pattern. This is a well-known pattern and is perfectly fine to use. You might also be interested in the non-static version of the Factory Pattern. I assume HttpClient is not "your class", in which case you of course can't add a meth...

Okay, so before I suggest coming here to OP, I would like some opinions.
0
Q: "Procedure too large" error with Private Subs

Laurentiu ManolacheI have in a Excel 2007 with multiple worksheets a working VBA code without errors that verify Hyperlinks from a range name and execute 2 different formatting. I have a subroutine for erasing formatting and another for reformatting in Module 1, which are called by their name: Erase_format and Doub...

The error is happening because he has too much shoved inside of a routine. Otherwise, the code would work. It's not really an "error". The code needs cleaned up.
Is that on topic?
seems to be a language quirk, that stops otherwise working code
IMO okay 2 go
@RubberDuck Is it off-topic for Stack Overflow?
That's how I felt.
@SimonAndréForsberg It's a dupe over there, so he's unlikely to get any specific help.
So... kind of.
@RubberDuck As it seems he knows how to get his code to work, he can post the working version of his code here I guess. ("After this change in code, I received "Procedure too large" compile error. If I put them back to "normal" subroutine everything works fine.")
12:33
Good point.
Isn't it easy enough to split it into two procedures as a work-around to get it running?
Just make sure to tell him that explaining the reason for why this error appears is not appropriate for CR.
That would be ugly and hence O(n)T on CR
I think I'm still going to bring it up on Meta, but in the meantime I'm going to suggest he bring the working version of his code here.
If you need specific help breaking this code down into something more manageable, you can bring the working version of the code to Code Review. All of it. (Yes, all of it.) I'm sure the advice you receive there would help you resolve the problem with the non-functioning version of your code as well. Just please be aware that broken code is explicitly off topic on CR. So, it's important that you bring the working version. — RubberDuck 38 secs ago
you should probably post this to codereview At a glance, your handler functions look very similar, they can probably be refactored into a single parametrized function. — doldt 41 secs ago
12:46
0
Q: Doubly Linked List Implementing iterator interface Java

user3636636I have created a doubly linked list and implemented my own iterator. However, i have done something wrong and my iterator results in endless loop. Have been struggling to find the error, so any feedback is much appreciated. Thanks in advance. import java.util.Iterator; import java.util.NoSuchEl...

0
Q: Recursive math expression eval

CaridorcIt has been very hard to use recursion, but I think that it made the code shorter and cleaner. import doctest import operator as op START_FOR_SYMBOLS = {'+': 0, '*': 1, '/':1, '-':0 } OP_FOR_SYMBOL = {'+': op.a...

I read that answer before, but it doesn't help me too much. I put here a part of my code just to be more readable, because is a big 'Select case'. All 'case' from this function differ from the others by the name of link and auto-sort options. I will try with Code Review too. Thanks for the tip. — LauM 1 min ago
-1
Q: How do I keep PATH in Python command line application

drincruzI have a command line application that has a top-level runner, run.py, and modules within their own package directories. Currently, we will cd into the source directory and then run python run.py, but it would be nice to do without the cd. Would it be good to add the following in our run.py impl...

13:07
Incoming A vs. B question that I tried to answer...
Greetings, Programs.
@Donald.McLean greetings user
0
Q: What is the recommended way of structuring CSS?

Michal StefanowI have the following CSS: .class { margin: 1%; margin-left: 0; } I wonder whether another way would be better? Option a) .class { margin: 1% 1% 1% 0; } Option b) .class { margin-top: 1%; margin-bottom: 1%; margin-right: 1%; } Option ... Any other recommended ways?

I almost thought it was Friday...
5
13:15
0
Q: Improving code - imaging with getPixel() and loops

user3916429i wrote a perfectly working code that reads an image, and then do a kind of threshold on it by zone. if the zone has too much white then it turn all the zone into white otherway it turns into black. Simple. Problem is, that code was originally from C++ source with pointers and all instead of Get...

@Donald.McLean I got the chillz here brother.
Seriously.
0
Q: Faster csv data loading in javascript with D3 crossfilter and dc.js

user456789123I'm building this Internet Movie Browser web tool to browse movies: All the code is in the html file in the link (view source CTRL-U). It's working, but I'm confronted to performance issues during the initial data loading. console: Data loaded (14319 ms). A 5 Mb CSV file is loaded with al...

13:32
@Donald.McLean the title alone....
that being said: protected final methods everywhere in my code...
13:50
Thanks , I agree, but I have been myself unable to drill down to the cause and hence the solution. Ergo I am providing the whole context so that anybody who is interested in the question gets the whole context and can answer accordingly. It may look like a performance tuning code review, but I badly need it :( — user808930 1 min ago
14:05
@Donald.McLean sounds awesome, but I don't have time to watch it right now.
@SimonAndréForsberg I chewed my wife out for telling me that yesterday was Wednesday and not Thursday. I told her "thanks for adding another work day to my week."
2
I could have played it off at work on Sunday, right?
-1
Q: jQuery Nav Slider Needs Improvement

Sean ParsonsI Created this Responsive jQuery navigation which will re-size when the pixels get < 500 px and display the mobile navigation, although when the browser re-sizes > 500px it runs the widthCheck() function which is supposed to run the jQuery code that returns it to tablet/desktop size, Although it ...

0
Q: D3 csv data loading and display with dc.js

user456789123This is part of a JavaScript web application I made as a personal project to browse a 10k movie database. (available here) The application is loading a big CSV file (5Mb) and then making some plots using dc.js and a table with datatables JavaScript plugin. The following code is too slow (>15 sec...

Is there anyone here that actively designs and documents their code/programs?
If any such beings exist, then what diagrams do you use to model it?
14:27
We have a license for a commercial product, but I avoid using it except when absolutely necessary.
@Donald.McLean I find myself often designing, but not documenting/visualizing my design
Okay... anyone know what kind of "number" this is?
&HFI
clearly that's 9.
@RubberDuck Base 64 ?
I thought it was hex at first, but Hex doesn't have an I.
14:32
neither does it have a H or a &
I believe Base 64 has all of them though
@SimonAndréForsberg that would be ... R.....
at least according to base64decode.org
&H is supposedly the prefix for hexadecimals in VB.Net
@RubberDuck then let's hope I is the postfix.
Maybe.............
Aha!
> Visual Basic supplies a set of literal type characters, which you can use to force a literal to assume a data type other than the one its form indicates. You do this by appending the character to the end of the literal. The following table shows the available literal type characters with examples of usage.
> J = 347I
You were right @SimonAndréForsberg
soo... it's 15 then...
14:41
0
Q: Counting Colors in Conway's Game of Life

CarcigenicateI have a basic version of CGoL running with pdCurses. My goal was to have each newly spawned cell take on the dominant color of their neighbors (if a spawned cell is mostly surrounded by red, make it red). I managed to get a half-baked solution working, but it has a few problems, mainly: It req...

@Vogel612 Yes. Thanks guys.
Without any details it's impossible to help in a meaningful way. This also sounds pretty close to an opinion-based answer; the Code Review StackExchange might be more appropriate. There's nothing overly "not neat" about factory classes, especially with static imports (which are another religious debate). — Dave Newton 50 secs ago
0
Q: Refactor ruby method to reduce 'Assignment Branch Condition Size'

Antarr ByrdI have method in my ruby code that set the default name for my model. Rubo complains that Assignment Branch Condition Size is too high, 21.24/15. How can I improve this? def set_default_display_name return unless display_name.blank? count = user.credentials.where(type: type).count if co...

0
Q: Text file parsing in C++

T145For fun, I've made a basic text file parsing class in C++ with the purpose of being light and quick. Since the code is rather large for a single post, I've posted it on GitHub; the header and source. Are there any ways that it could be improved? I am using C++11, so I've leveraged the usage of th...

@DaveNewton do you think that CodeReview can help in a more meaningful way with that incredible amount of detail? Additionally, are you aware that CodeReview needs code to review? Please read: meta.stackoverflow.com/questions/253975/…Vogel612 54 secs ago
@Vogel612 Hence my leading comment regarding the lack of details. It turns out I actually am aware that a code review requires code to review, but I sincerely appreciate your concern. — Dave Newton 34 secs ago
@DaveNewton sorry.... having a bad day here... but then again, people don't read. and some people actually do think that CodeReview accepts questions like this, so I wanted to be on the safe side... — Vogel612 1 min ago
15:04
0
Q: Contest programming - Find the next multiple of N that is a perfect square number

user70000Given a number t (1 <= t <= 1000) that represent testcases and t numbers n (1 <= n <= 10⁹). Show the next multiple of N that is a perfect square number. Example of input: 5 5 9 10 12 13 Example of output: Case #1: 25 Case #2: 9 Case #3: 100 Case #4: 36 Case #5: 169 My solution iterates over a...

you should always assume the next programmer is not going to know what you were doing, even if the next programmer is you. — Lyle's Mug 7 secs ago
▲▲ can I get an amen?
Amen
Okay guys. I need some naming advice.
I have this code here.
If style > vbInformation + vbRetryCancel Then
    messageBoxIcon = (style And 240)
End If
and want to create a constant for 240.
Jeremy?
That's his IQ ;-)
The constant is calculated by bitwise ORing the legal values
If this is a working code snippet, it would be more productive for you to post it on the CodeReview Stack Exchange site. — jbutler483 27 secs ago
15:18
000010000 ==  16 ==  10 == vbCritical
000100000 ==  32 ==  20 == vbQuestion
000110000 ==  48 ==  30 == vbExclamation
001000000 ==  64 ==  40 == vbInformation
------------------------Bit-Wise OR
011110000 == 240 ==  f0 == constant for pulling out icon
Call it Jeremy
This looks like a question for codereview.stackexchange.comTichodroma 31 secs ago
in VBA, 4 mins ago, by RubberDuck
18 mins ago, by RubberDuck
Is it a bad sign if I want to name a constant MagicBitShiftingNumber?
Oh! don't name it dummy!
@RubberDuck TWO_HUNDRED_FORTY
If style > vbInformation + vbRetryCancel Then
    messageBoxIcon = (style And (vbCritical OR vbQuestion OR vbExclamation OR vbInformation))
End If
15:19
@RubberDuck That's actually quite a good name
It explains the intents, which are absolutely magic and hackery
2
I like Jeremy more and more by the second.
Don't pretend that your code is less hackish than it actually is ;)
It's not my fault someone decided to use non-binary bit shifting in 1990.
Maybe this question is better suited for Code Review? — Donkey Kong 51 secs ago
You may want to consider posting this question at codereview.stackexchange.com instead. Please note that there is always a way of "doing this faster", e.g. not using Python. — pyStarter 54 secs ago
0
Q: Short Python for fun

yammI am new to Python (~9 Month). Its a lot of fun because code allways looks good and is structured. But with a bit of trial and error i found out that this is only because of god practice and not because of Python itself. Here an example of function for rot13/cesar encryption: def r(s):return''....

-1
Q: Does a Newsletter able to make responsive

NavyaCan't we able to develop Responsive Newsletters which should work on all emails clients, Browsers and deveices....? Checked with the below page but having issues with this also

15:37
@CaptainObvious I assume we're talking about a newly hatched python here?
Man, I hate negotiations.
@nhgrif Have you tried the "GIVE ME THE MONEY OR I'LL KILL YOU" approach?
The holy war has flared up again
tabs vs. spaces?
Curly Braces
15:51
Cool... where?
a basic 101 class should tell you to always use braces, more advanced classes should show you shortcuts. not using braces is a shortcut. — Lyle's Mug 1 min ago
Spaces.
@skiwi Advanced Installer is not cheap, but it will let you bundle JRE in your installer.
No-one is going to win an argument about 1-line bracing style in the comments to an answer on Code Review. (unless it is me, that is....). Let's take that sort of debate to chat - The 2nd Monitor. The previous comments are about to get wiped (cc. @Magus) — rolfl ♦ 40 secs ago
5
@nhgrif a tab that inserts four spaces instead of a "\t"
Compromise
@nhgrif Not cheap seems to be a no-go then :(
16:03
Proof that great reviews don't need any code: codereview.stackexchange.com/a/86412/31503
1
A: Find the next multiple of N that is a perfect square number

Gareth ReesI'm afraid we need to use… math. Take any square number and look at its prime factorization. For example, \$ 100 = 2^2·5^2 \$; \$ 144 = 2^4·3^2 \$; \$ 729 = 3^6 \$. The thing that's common to all of these examples is that the exponent of each prime in the factorization is even. And that's becaus...

@inmyth I actually haven't seen any issues; this is from source analysis/code review from fixing a different bug (which was caused by the symptoms explained here: androiddesignpatterns.com/2013/08/…) — scorpiodawg 1 min ago
0
Q: HackerRankt Sherlock and GCD challenge

Calculus5000I've written an implementation for the Sherlock GCD HackerRank Challenge. As the running time of my algorithm is something like O(kn^2), I reckon that there’s a more efficient algorithm that could be used instead. Are there any improvements that can be made to my implementation to reduce the runn...

@rolfl but I did win... not using Braces is a short cult shortcut
that started as a typo but I found it slightly comical.
You only win when I say you do ;-)
16:25
Hi!
Relevant repost:
yesterday, by 200_success
> I really dis-liked having unnecessary braces. This… unfortunate… style preference plagued us for quite a while and caused all sorts of avoidable logic errors.
That's what the author of jQuery says.
2
16
A: April 2015 Community Challenge

RubberDuckRe-Nominating this one, because I think it's a fun little challenge. http://meta.codereview.stackexchange.com/a/3786/41243 Implement a simple calculator Where the definition of "simple" is whatever you make it - only supports basic arithmetic operators? Fine. It supports scientific notatio...

it's a go!
@200_success I am confused, having the braces caused avoidable logic errors? like what? did he give examples?
@Lyle'sMug - I was similarly confused, but I think the key expression in there is:
> I really dis-liked having unnecessary braces. This… unfortunate… style preference plagued us for quite a while ....
2
the past-tense "liked"
past tense? he originally ... ▲▲
at one point he thought it was a bad idea, but he doesn't think that way anymore .
16:36
> I used to dislike having unnecessary braces .... but I regret that now ....
this style preference = not using braces preference
Out of interest.... the fact that the author of the language communicates in double-negatives is a good indicator that the language logic will be hard to comprehend too ;-)
3
gotcha. I doubt many people read it that way though.... it's sad really
0
Q: Optimization of line segment to circle 'collision' algorithm

Tochi ObuduluI've written a function (in Python 3) which computes if a line segment (constraint) and a circle (body) collide, and returns the point of intersection (closest point to the centre of the circle): def constraintCollide(self, constraint): p1 = constraint.point1 # Sets the first point object o...

0
Q: Calculate when games ending in 0 start

4tiresI'm having trouble at getting this right, I'm new to javascript and I don't have many knowledge of HTML and Javascript interactions. The original and always updated code is here: Empire Attack index.html <!DOCTYPE html> <html> <head> <link rel='stylesheet' href='style.css'/> <script src...

@rolfl lol it is JavaScript
16:39
exactly ^^^^^
You have to double-check falsey for everything anyway ;-)
chuckles
914
A: How to check a not-defined variable in JavaScript

NatriumIn JavaScript, null is an object. There's another value for things that don't exist, undefined. The DOM returns null for almost all cases where it fails to find some structure in the document, but in JavaScript itself undefined is the value used. Second, no, there is not a direct equivalent. If ...

how confusing. I should learn javascript, I kind of just wing it right now. maybe I should do that before learning MVC?
@rolfl You mean that the language logic will not be easy to comprehend, right?
one way to pimp your answer is to flare up a holy war, just make sure that you are correct....lol
@skiwi JavaScript isn't a real language like C# or Java... ;-) JK
16:44
@skiwi No, I mean that not using positive assertions in unnatural languages is not natural for people who do not use double negatives in natural languages.
4
capiche?
0
Q: Consolidating my HTML, CSS and JS code in order to adhere to best practices

ANMAs I'm getting to grips with front end development I'm looking to consolidate/improve my below HTML, CSS and JS code in terms of adhering to best practices so any advice is appreciated. Quick overview: I'm working on a page which has required me to create a page with a nav bar, a horizontal bar...

yes I just did that....
off to work.
I mean back to work
@rolfl Not wrong.
17:02
@rolfl jQuery is not a language.
0
Q: New to C++, trying to use cin, strings and if

frandarreI'm trying to do a simple program where the user inputs a string with his/her name, then if the string is equal to a certain name, it executes different commands. It's something like this: #include <iostream> #include <string> #include <sstream> using namespace std; int main() { string input...

How to you address someone if you can't make out the gender from their name?
Is just "Dear" fine in English?
I do see their whole name so it would be strange to address them as "Dear Mr/Mrs"
Usually you shouldn't be worrying that much about it ^^
I often use "Dear dr. xyz"
But that's with doctors or professors
ahhh
I looked at the recommendations
referred to as "she"
Then she's probably female
17:15
I'll assume she's still a she
If you don't know them that well, then it's probably not appropriate to use "Dear".
What should be used instead?
Possibly nothing. Context?
Job inquiry
(for an internship)
Addressed to HR, or to a hiring manager?
HR=human resources staff member
17:21
A little bit of both, depends on what I can find on linkedin
If to HR, use the name you know. Dear is fine, but use with lastname and salutation only.
otherwise: "To whom it may concern"
at least that's what I learned
@Vogel612 so Dear Mr Blaat?
If it's addressed to HR, then it probably doesn't matter at all. "Dear Sir/Madam" will do.
@Vogel612 that's really impersonal though
17:23
If it's to a specific manager, "Mr. X" or "Mrs. X" or something.
@JeroenVannevel well that's the customs from what I know.
In Germany you are supposed to write "Sehr geehrte Damen und Herren"
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 1 min ago
Story time: I once filled in the web form on Lufthansa's website with an inquiry. The form had the typical German titles to choose from: Mr., Mrs., Herr, Herr Prof., etc. But since I chose English as the preferred language, the request went to their service centre in Ireland. The e-mail response I got just said "Dear Sir/Madam" or something like that.
I recommend codereview.stackexchange.com for such requests ! — Sulthan Allaudeen 1 min ago
I don't think it is fair to suggest codereview unless you are active on that exchange, and following these same tags. — hpaulj 1 min ago
It's not a big deal in English, really.
17:26
The problem here is what, exactly? If you want a Code Review, you need to ask elsewhere. — cimmanon 29 secs ago
@Vogel612 In Dutch I would say "Beste" or "Geachte" if they're really fancy but the closest to that in English is something grandma would say to her grandkids
yes, exactly
@Duga I love you, hpaulj!
"Very honored ladies and gentlemen" ... ~facedesk
I'm voting to close this question as off-topic because it is asking for a Code Review, there is no actual problem that needs solving. — cimmanon 1 min ago
As a moderator for Code Review, I'd say that this would be a good question there. — 200_success 43 secs ago
17:35
@JeroenVannevel Dutch is way easier
if anyone cares, I edited my answer to explain why I feel the way I do about Bracing Style.
brace all the things
brace yourselves, the holy war is coming back
4
@DanLyons shouldn't that be
17:51
@JeroenVannevel I'm not exactly negotiating my own salary really...
recruiter?
It's just a negotiation and salary is only part of it. It's not even entirely about me.
No.
Oh like that
@Vogel612 should have linked to the English version...lol
17:52
goddammit fixed
I might be having a conversation with the owner of my current company soon.
space yourselves, the holy war is coming back
holy wars always lead to drinking, so we should start a tab :)
4
@Vogel612 that doesn't actually mention The Bracing
it does
check the last point under "Layout Conventions"
17:56
> Use parentheses to make clauses in an expression apparent, as shown in the following code.
Parentheses --> ( )
Curly Braces --> { }
they are talking about this line
> if ((val1 > val2) && (val1 > val3))
~curses loudly
lol sorry.
meh. it's the C# guidelines anyways. I don't have to care about them ;)
but MSDN uses the same Bracing style (MOSTLY) as what I was saying is standard
now on the other hand it would be nice to find out, why I can't get DOM manipulations to work properly...
17:58
that sounds like a JavaScript issue
I wasn't being rude, or at least not trying to be. I was just telling you how the site works.. link. There are many different ways to create a "concurrent server receiver". You're expected to look into it on your own, give an attempt, then post your problem here once you run into one. I also suggest checking out [link] "Act as if you're talking to a busy colleague". No need to be so hostile; that'll make me not want to help you in the future. CodeReview can help you improve your systems. "Idea" isn't what this site is for; its for a specific answers — Vince Emigh 1 min ago
18:12
@Magus - You misunderstand what I was saying. I was saying do not argue the merits of braces in comments on an answer, use chat. I am not concerned about you debating them, I am concerned about you debating them in comments. I have deleted your other comments now too.
@Lyle'sMug - that applies to you to .....
Hey Magus. Welcome to the 2nd.
I have yet to argue about their value. I argue that you cannot call it a standard. It is specified in no standard. Specifying otherwise is simply incorrect.
I am not particularlty interested in what the debate is.
2
I am more interested in where it is.
The answer has factual issues. That is what comments are for.
No, that's what votes are for.
@Magus and also not if they devolve into an extensive discussion
because that's what chat is there for
18:18
Votes don't fix the answer, because the author doesn't know what the problem is.
There is truth to that too.
but, extended discussions in comments are not the right place to 'educate' people on your perspective though.
I do have my own opinions on brace-style, but, from a site-moderation perspective, I also need to keep the debate in the right venue.
I'm not trying to convince anyone of anything, i'm trying to fix an answer
i dont care what people do with braces
i care that people say that 'this is the right way'
when there is no spec
and specifically the word 'standard'
which has a very well defined meaning
Yeah, I see your point, but, again, that's why there is a downvote button.
I look at @Lyle'sMug 's answer, and it's now a completely contradictory one....
it's a mess ;-) (hey @Lyle)
It needs some serious edits, but it isn't all wrong
@rolfl what do you mean by contradictory?
18:22
that's the problem I have
> The body of the loop consists of a statement, an empty statement, or a block of statements, which you create by enclosing zero or more statements in braces.
half way down the page
> Always use Curly Braces, people won't notice if you use them, and programmers will be expecting them when you don't use them, especially for for loops.
.....
> It is highly recommended by the majority of Programmings (C#, Java, etc.) to use Curly Braces always.

Most exceptions to this rule are simple if statements that perform some simple single line of code when the simple condition is satisfied.

.....

then I would agree that Curly Braces are not needed.
What is it, they are not needed, or always have them?
again, i do agree that that for loop should have braces, but for consistency
approaching it from the direction of a non-standard rule is very strange
Meh, braces will always be a "religious" battle, and I always recommend to people to use them, but also to use whatever "local rules" they have for coding standards.
Did Malachi change his name to Lyle's Mug?
18:26
but thats not my main point
@Magus not sure I am following this statement
@Hosch250 :) yes
> Both the then-statement and the else-statement can consist of a single statement or multiple statements that are enclosed in braces ({}). For a single statement, the braces are optional but recommended.
yes, optional but recommended
that isnt 'always use them'
its a suggestion
Optional, but Highly Recommended.
18:28
no?
I used to not use them.
again
my point isnt whether or not you should tell people to use them
I've changed from my wicked ways (JK, about the wicked).
its about whether or not you should call 'always use them' standard
its not 'standard'
I could agree with that ^^^
18:29
it is at most 'suggested'
I don't know if it is standard, but I think it is 'Highly Recommended'.
microsoft didnt say highly :D
generally recommended?'
that would work
I didn't say they did, the community did.
Monkey Recommended?
Depends on which definition of "standard" you mean. Standard vs. non-standard? Or standard vs. substandard?
18:30
so, generally
> All monkeys who responded to the question: "should braces be used for 1-liners" responded unequivocally: Yes!
Well, the C# community here usually highly recommends braces...
Nothing can stop innovation. Microsoft first commit after forking Docker (via @jjarmoc ) - https://github.com/Microsoft/docker/commit/bad29cf9adb8fcc78347eb0a8c154c04a7b36e2e http://t.co/TfCE7dULm1
or, the ones who answer questions on CR at least
thta's why i suggest 'generally'
it makes less assumptions
> Use parentheses to make clauses in an expression apparent, as shown in the following code.
No distinction between one-liners or multiple lines
18:33
When Microsoft (The Creators of C#) recommend using Braces on an Official website, wouldn't you call that standard practice?
I think we have all agreed that the standard does not mandate braces ;-)
Well, I don't have time to start my personal crusade on braces right now because school is calling me. If you want, I'll debate them with you after May 10th in a different room.
This seems to be a violent agreement. There is no debate that braces are not a MUST (in the RFC sense of MUST, as a requirement), but braces are a SHOULD. The question is about the definition of the word "standard". Take this debate to the English Language & Usage chat room.
3
parentheses are different
nevermiiiind
18:34
thats a totally unrelated thing
0
Q: Slider with JavaScript

user3448600I built this simple slider with JS, but I am not so experienced with programming and I wonder what can be improved in this code, how to dry it, or how to apply some OOP paradigms to it, what is not good in it, what is bad practice... If you are going to build this simple slider how would you appr...

braces are a 'probably should'
thats all i'm saying
people treat it like a hard rule, and shouldnt
anyway, i'm out
I ignored this tab for an hour because of this immensely boring discussion
Cheers
It's C-girl all over again
18:50
Shouldn't this be on CodeReview? — Kevin Workman 1 min ago
Perhaps try Codereview.stackexchange.com? — Andy Turner 1 min ago
@AndyTurner The code does not work as intended (2nd turn not working correctly) which unfortunately makes it off-topic for Code Review. — Simon André Forsberg 1 min ago
0
Q: Case insensitively removing a substring, efficiently

alanbuchananI am going through the CodingBat exercises for Java. I have just completed this one: Given two strings, base and remove, return a version of the base string where all instances of the remove string have been removed (not case sensitive). You may assume that the remove string is length 1 or mo...

@KevinWorkman Considering that the questions does not seem directly related to the code, I don't think it would fit well on Code Review. — Simon André Forsberg just now
@JeroenVannevel I see that you Belgians got themselves a new public scandal with Prince Laurent again

« first day (705 days earlier)      last day (3610 days later) »