It's too complicated to understand
-
//This is a bad way to merge in the dropdown info in terms of performance in the skins, but this code is too complicated to understand.
//I know this will workFollowed by some counter increments. :doh: Marc
V.A.P.O.R.ware - Visual Assisted Programming / Organizational Representation Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802
Code was changed but comment wasn't? Or comment was copied from somewhere else and never edited? Or the developer was suffering from hypocaffenation? Or whoever wrote that was a complete idiot?
What do you get when you cross a joke with a rhetorical question? The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism. Do questions with multiple question marks annoy you???
-
//This is a bad way to merge in the dropdown info in terms of performance in the skins, but this code is too complicated to understand.
//I know this will workFollowed by some counter increments. :doh: Marc
V.A.P.O.R.ware - Visual Assisted Programming / Organizational Representation Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802
Kind of reminds me of one one Jeff Spicoli, on fixing a car.
Quote:
Relax, all right? My old man is a television repairman, he's got this ultimate set of tools. I can fix it.
"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
-
//This is a bad way to merge in the dropdown info in terms of performance in the skins, but this code is too complicated to understand.
//I know this will workFollowed by some counter increments. :doh: Marc
V.A.P.O.R.ware - Visual Assisted Programming / Organizational Representation Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802
-
//This is a bad way to merge in the dropdown info in terms of performance in the skins, but this code is too complicated to understand.
//I know this will workFollowed by some counter increments. :doh: Marc
V.A.P.O.R.ware - Visual Assisted Programming / Organizational Representation Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802
//You are not expected to understand this.
:-D
-
//This is a bad way to merge in the dropdown info in terms of performance in the skins, but this code is too complicated to understand.
//I know this will workFollowed by some counter increments. :doh: Marc
V.A.P.O.R.ware - Visual Assisted Programming / Organizational Representation Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802
That reads like a Daily Affirmation with Stuart Smalley. Brilliant!
"There are three kinds of lies: lies, damned lies and statistics." - Benjamin Disraeli
-
//This is a bad way to merge in the dropdown info in terms of performance in the skins, but this code is too complicated to understand.
//I know this will workFollowed by some counter increments. :doh: Marc
V.A.P.O.R.ware - Visual Assisted Programming / Organizational Representation Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802
#region Note To Future Developer /\* NOTE TO FUTURE DEVELOPER \*/ /\* You might look at below line of code and wonder why this is done this way. You are already checking for order type in download process. Business has done politician level backflip on the last day of UAT on the original logic and wanted to check if they have created 2 COs with same job number and first is already processed next one needs to be regen. Download would have it as a new code. If this requirement was known from the beginning this logic would have been totally different. This logic makes download process pretty redundant as you may have called APIs when CO is scanned and get data from M3 and do rest of the checking. \*/ #endregion
Zen and the art of software maintenance : rm -rf * Maths is like love : a simple idea but it can get complicated.
-
//This is a bad way to merge in the dropdown info in terms of performance in the skins, but this code is too complicated to understand.
//I know this will workFollowed by some counter increments. :doh: Marc
V.A.P.O.R.ware - Visual Assisted Programming / Organizational Representation Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802
At my first job we had a senior developer who was very into OOP. Only problem is the code base was Microsoft C 5.1. The guy was building C code like it was C++ classes, few people could follow it. After he moved on to bigger and better things I got to debug some of his stuff and found a comment like "We aren't supposed to free() the same pointer twice but since it doesn't hurt anything" Coming from Mister High and Mighty "Your code better conform and produce no warnings." :wtf:
-
At my first job we had a senior developer who was very into OOP. Only problem is the code base was Microsoft C 5.1. The guy was building C code like it was C++ classes, few people could follow it. After he moved on to bigger and better things I got to debug some of his stuff and found a comment like "We aren't supposed to free() the same pointer twice but since it doesn't hurt anything" Coming from Mister High and Mighty "Your code better conform and produce no warnings." :wtf:
MarkTJohnson wrote:
We aren't supposed to free() the same pointer twice but since it doesn't hurt anything
Oh my, that is a very dangerous assumption I've seen people make before.
//First
char* data = (char*)malloc(100 * sizeof *data);
free(data);
data = NULL;
free(data);//Second
char* data = (char*)malloc(100 * sizeof *data);
free(data);
free(data);First one isn't going to cause problems. Calling
free
on an allocated pointer de-allocates that memory. Callingfree
on anull
pointer doesn't do anything. But callingfree
on a non-null, de-allocated pointer as in the second example de-allocates the memory again which has undefined behavior. Another process or thread could have allocated that memory before the 2nd de-allocation. Now you've invalidated memory another program was using. -
MarkTJohnson wrote:
We aren't supposed to free() the same pointer twice but since it doesn't hurt anything
Oh my, that is a very dangerous assumption I've seen people make before.
//First
char* data = (char*)malloc(100 * sizeof *data);
free(data);
data = NULL;
free(data);//Second
char* data = (char*)malloc(100 * sizeof *data);
free(data);
free(data);First one isn't going to cause problems. Calling
free
on an allocated pointer de-allocates that memory. Callingfree
on anull
pointer doesn't do anything. But callingfree
on a non-null, de-allocated pointer as in the second example de-allocates the memory again which has undefined behavior. Another process or thread could have allocated that memory before the 2nd de-allocation. Now you've invalidated memory another program was using.Or if you deallocate, allocate to something else, and then deallocate the original pointer again. Your new allocation has then been deallocated ... sometimes :~ Don't you just love intermittent bugs?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
-
comment said:
//I know this will work
// Note to self: do not make notes to self in comments in code.
:laugh:
raddevus wrote:
// Note to self: do not make notes to self in comments in code.
Right. Use the third person instead.
The language is JavaScript. that of Mordor, which I will not utter here
This is Javascript. If you put big wheels and a racing stripe on a golf cart, it's still a fucking golf cart.
"I don't know, extraterrestrial?" "You mean like from space?" "No, from Canada." If software development were a circus, we would all be the clowns. -
comment said:
//I know this will work
// Note to self: do not make notes to self in comments in code.
:laugh: