Hot Summer Deals are Here!
Celebrate with up to 90% off on 13,200 resources
04
Days
21
Hours
50
Mins
55
Secs

Discussion: Plugin Prices

Status
This thread has been locked.

Justis

Community Member
Management
Feedback score
61
Posts
2,117
Reactions
2,414
Resources
0
CSquared, Shadow, Jeez, you're both right.
You should always document your code, certainly.
You should also always write efficiently, cutting down your function size is *usually* but not always, more efficient, and *normally* but not always, makes it easier to read.
In instances where it doesn't you should use your best judgement as an experienced developer to decide which is more valuable for that particular occasion.
There might be disagreements on case by case basis, but nobody here is forced to collaborate with each other on a project, so lets not get in fist fights over disagreements on three lines of inconsequential pseudocode.
 

CSquared

Banned
Feedback score
0
Posts
27
Reactions
10
Resources
0
CSquared, Shadow, Jeez, you're both right.
You should always document your code, certainly.
You should also always write efficiently, cutting down your function size *usually* but not always, more efficient, and *normally* but not always, makes it easier to read.
In instances where it doesn't you should use your best judgement as an experienced developer to decide which is more valuable for that particular occasion.
There might be disagreements on case by case basis, but nobody here is forced to collaborate with each other on a project, so lets not get in fist fights over disagreements on three lines of inconsequential pseudocode.
I don't think it got heated, just some intellectual debate.
 
Banned forever. Reason: Scamming (https://builtbybit.com/threads/csquared-scam-report.147579/)

Shadow

Dev
Premium
Feedback score
2
Posts
424
Reactions
308
Resources
0
Also you wouldn't see a performance impact at all. The compiler optimizes the code when you compile it.
 

TheRealDan

Software Developer
Supreme
Feedback score
15
Posts
274
Reactions
126
Resources
0
Also you wouldn't see a performance impact at all. The compiler optimizes the code when you compile it.
How accurate is this?

I wouldn't be surprised if this happened to a certain extent, but I often spend a fair amount of time optimizing code that would otherwise be irrelevant if this is so.
 

Justis

Community Member
Management
Feedback score
61
Posts
2,117
Reactions
2,414
Resources
0
Also you wouldn't see a performance impact at all. The compiler optimizes the code when you compile it.
How accurate is this?

I wouldn't be surprised if this happened to a certain extent, but I often spend a fair amount of time optimizing code that would otherwise be irrelevant if this is so.

There's only so much a compiler can do to optimize what you give it.
The example Shadow gave was something so small, nobody would even think to care whether you put it one way or another.
And then they had a huge argument over it. :p

What I was talking about was stuff that really matters, like storing data within an improper scope, duplicating content/processes unnecessarily, things that could actually effect performance are usually design flaws in your program, which a compiler cannot fix with it's micro-optimizations. (Which btw, are already unreliably specific)
 
Last edited:

Shadow

Dev
Premium
Feedback score
2
Posts
424
Reactions
308
Resources
0
How accurate is this?

I wouldn't be surprised if this happened to a certain extent, but I often spend a fair amount of time optimizing code that would otherwise be irrelevant if this is so.
There's only so much a compiler can do to optimize what you give it.
The example Shadow gave was something so small, nobody would even think to care whether you put it one way or another.
And then they had a huge argument over it. :p

What I was talking about was stuff that really matters, like storing data within an improper scope, duplicating content/processes unnecessarily, things that could actually effect performance are usually design flaws in your program, which a compiler cannot fix with it's optimizations.
If you consider that a huge argument then you must have never experienced a argument. I recommend you watch the elction debates. That will teach you what a huge argument is. Kappa
 

Justis

Community Member
Management
Feedback score
61
Posts
2,117
Reactions
2,414
Resources
0
If you consider that a huge argument then you must have never experienced a argument. I recommend you watch the elction debates. That will teach you what a huge argument is. Kappa
You're the one that was so overwhelmed by it you had to say "I'm not going to argue with you" before failing to drop a t-rekt
 

Shadow

Dev
Premium
Feedback score
2
Posts
424
Reactions
308
Resources
0
You're the one that was so overwhelmed by it you had to say "I'm not going to argue with you" before failing to drop a :rekt:
? LOL. First off, learn the definition of half. Its either you don't know it or you cant read. The second thing is I said I am not going to argue with you because if I am not going to change his opinion why argue. Third at least the face of my profile pic doesn't look like a 2 year old that found markers for the first time. :rekt::rekt::rekt:
 

Shadow

Dev
Premium
Feedback score
2
Posts
424
Reactions
308
Resources
0
The most advanced thing the Compiler can do towards optimization is String Demultiplication Kappa

But seriously, if you have to rely on the Compiler for optimisation, something's flawed.
If you looked at the code I was referencing to, the compiler would optimize it so it wouldn't have any more of a performance impact than the first thing.
 

Shadow

Dev
Premium
Feedback score
2
Posts
424
Reactions
308
Resources
0
Still not a reason to leave it for the Compiler
So you are saying that you would always use this
Code:
var result = methodOne(methodTwo(a, methodThree(b)), c, d);

instead of this
Code:
var result3 = methodThree(b);
var result2 = methodTwo(a, result3);
var result = methodOne(result2, c, d);
 

JC_Plays_MC

Software Engineer
Supreme
Feedback score
8
Posts
938
Reactions
134
Resources
6
So you are saying that you would always use this
Code:
var result = methodOne(methodTwo(a, methodThree(b)), c, d);

instead of this
Code:
var result3 = methodThree(b);
var result2 = methodTwo(a, result3);
var result = methodOne(result2, c, d);

Yes. The second way seems pointless as you're wasting more time assigning variables you only plan to use once.
 

Shadow

Dev
Premium
Feedback score
2
Posts
424
Reactions
308
Resources
0
Yes. The second way seems pointless as you're wasting more time assigning variables you only plan to use once.
When you code you don't need to have indentations or comments. We use them because when you go back to read over the code you want it to be easy to read. That is why we use indentations and spaces etc. If you are reading through your code it will take you longer to see what the first version is trying to do than the second version.
 

JC_Plays_MC

Software Engineer
Supreme
Feedback score
8
Posts
938
Reactions
134
Resources
6
When you code you don't need to have indentations or comments. We use them because when you go back to read over the code you want it to be easy to read. That is why we use indentations and spaces etc. If you are reading through your code it will take you longer to see what the first version is trying to do than the second version.

Well when you simply add the following above it:

//This executes method 1-3

You're argument is rather poor in this situation as you're taking about indentations when that literally has nothing to do with what you're trying to argue. So simple answer is use comments makes life 10x easier.
 

Shadow

Dev
Premium
Feedback score
2
Posts
424
Reactions
308
Resources
0
Well when you simply add the following above it:

//This executes method 1-3

You're argument is rather poor in this situation as you're taking about indentations when that literally has nothing to do with what you're trying to argue. So simple answer is use comments makes life 10x easier.
You shouldn't use a comment for just 1 line of code.
 

JC_Plays_MC

Software Engineer
Supreme
Feedback score
8
Posts
938
Reactions
134
Resources
6
You shouldn't use a comment for just 1 line of code.

You shouldn't use 3 variables for something that can be done in one line of code. Comments literally don't affect runtime at all so you can and should use as many as you want.
 

Shadow

Dev
Premium
Feedback score
2
Posts
424
Reactions
308
Resources
0
Status
This thread has been locked.
Top