|
1. The lounge is for the CodeProject community to discuss things of interest to the community, and as a place for the whole community to participate. It is, first and foremost, a respectful meeting and discussion area for those wishing to discuss the life of a Software developer.
The #1 rule is: Be respectful of others, of the site, and of the community as a whole.
2. Technical discussions are welcome, but if you need specific programming question answered please use Quick Answers[^], or to discussion your programming problem in depth use the programming forums[^]. We encourage technical discussion, but this is a general discussion forum, not a programming Q&A forum. Posts will be moved or deleted if they fit better elsewhere.
3. No sys-admin, networking, "how do I setup XYZ" questions. For those use the SysAdmin[^] or Hardware and Devices[^] forums.
4. No politics (including enviro-politics[^]), no sex, no religion. This is a community for software development. There are plenty of other sites that are far more appropriate for these discussions.
5. Nothing Not Safe For Work, nothing you would not want your wife/husband, your girlfriend/boyfriend, your mother or your kid sister seeing on your screen.
6. Any personal attacks, any spam, any advertising, any trolling, or any abuse of the rules will result in your account being removed.
7. Not everyone's first language is English. Be understanding.
Please respect the community and respect each other. We are of many cultures so remember that. Don't assume others understand you are joking, don't belittle anyone for taking offense or being thin skinned.
We are a community for software developers. Leave the egos at the door.
cheers,
Chris Maunder
The Code Project | Co-founder
Microsoft C++ MVP
modified 16-Sep-19 9:31am.
|
|
|
|
|
Give a man a duck, and he'll feed himself for days; teach a man to duck and he'll avoid low flying objects.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Such as, possibly, ducks.
"They have a consciousness, they have a life, they have a soul! Damn you! Let the rabbits wear glasses! Save our brothers! Can I get an amen?"
|
|
|
|
|
I'll take a quack at this, but I don't know what the flock I'm talking about. I don't wish to run afowl of the admins here, as they may drake me over the coals. Migrate contribution to this thread is to stop paddling these puns as if they actually fit the bill.
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
What quackery is this?
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
I wonder what Daffy would do?
|
|
|
|
|
Whatever Donald does, of course.
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
lol,
I can't help but wonder if this isn't about my sphere packing post. quack quack

|
|
|
|
|
C#: var foo = "foo";
JS: let foo = "foo";
or:
let foo = 'foo';
C#: var s = $"Foo = {foo}";
JS: let s = Foo = `${foo}`;
C#: int Fnc(string a)
TS: fnc(a: string): number
C#: braces are on separate lines
JS: opening brace is on the same line.
C#: if (!String.IsNullOrEmpty(foo))
JS: if (foo)
C#: Reverse(foo);
JS: this.reverse(foo);
or even worse: this.reverse(this.foo);
Half the time I wrote the wrong syntax for the wrong language.
|
|
|
|
|
Do one language and do it well.
|
|
|
|
|
PIEBALDconsult wrote: Do one language and do it well. If only I could. 
|
|
|
|
|
With all your years of assembler I'm pretty sure you can
"I didn't mention the bats - he'd see them soon enough" - Hunter S Thompson - RIP
|
|
|
|
|
There was a time when i could write Univac assembler code with only minimal reference to the OS reference manual. Modern languages are now so feature rich you need the SDK reference almost every few lines. Or maybe I am just not very good at it.
|
|
|
|
|
A find a blend of Google and Intellisense works for me - but yes, I take your point the framework is massive. Assembler is much more interesting to the likes of me though.
"I didn't mention the bats - he'd see them soon enough" - Hunter S Thompson - RIP
|
|
|
|
|
Richard MacCutchan wrote: If only I could.
(Obligatory Reply):
Do you mean just 'do one language' or do you mean 'do it well'?
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
PIEBALDconsult wrote: Do one language and do it well.
I can do both And both are continual "doing it better" experiences. That never ends, no matter how many years I've done development. Not only because of course the language features evolve.
|
|
|
|
|
Marc Clifton wrote: JS: let s = Foo = `${foo}`;
Or, if you get the quotes in the right place:
let s = `Foo = ${foo}`;
Marc Clifton wrote: C#: braces are on separate lines
JS: opening brace is on the same line.
Actually, in C#, braces can be on the same line, a different line, or whatever you call the abomination of a formatting style that @OriginalGriff prefers.
JS mostly doesn't care. It's only an issue with things like return { ... }; , where putting the opening brace on a new line confuses the parser into thinking it's two statements with a missing semicolon after return .
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Aside from the opening brace belonging on the same line as functions, conditionals, &etc., which is a well established and eternal truth, I have a question:
Using javaScript, I have never used 'let' to introduce a symbol declaration. I have used 'var'. Aside from some sort of visual distinction, does it serve any value.
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
Yes, variables declared using let[^] and const[^] behave differently to those declared using var . The MDN documentation does a pretty good job of explaining the difference.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
It's all about the scope.
- I would love to change the world, but they won’t give me the source code.
|
|
|
|
|
Richard Deeming wrote: Or, if you get the quotes in the right place:
Oops.
Richard Deeming wrote: Actually, in C#, braces can be on the same line, a different line,
Well yes, but ever since C++ I've used the separate line style.
Richard Deeming wrote: JS mostly doesn't care. It's only an issue with things like return { ... };
I believe
return ({...}); also helps that? I know in some cases I have to put the object {} in parens so as not to confuse JS.
|
|
|
|
|
used to do this all the dang time.
I don't write Javascript anymore unless I have too. hasn't happened in over a year! Yay me.
But I switch between Powershell, SQL, C# etc... I sometimes forget how to comment in the language I am in at the time. It seems strange to me. I can write code quite well switching around. But I cannot remember how to comment in Powershell vs SQL vs C#.
The Brain it is strange.
To err is human to really elephant it up you need a computer
|
|
|
|
|
rnbergren wrote: I sometimes forget how to comment in the language I am
Most folks I know don't know how to comment in any language; or, if they do know how, they don't use that ability.
|
|
|
|
|
Just like Turn Signals on Cars
To err is human to really elephant it up you need a computer
|
|
|
|
|
rnbergren wrote: I sometimes forget how to comment in the language
Comments? What are those and when did that feature get introduced?
|
|
|
|