What does the term “Payload” mean in programming
I was going through the source code of an open source framework, where I saw a variable “payload” mentioned many times. Any ideas what “payload” stands for?
Order of subject and modifiers in variable names
I’m looking for experiences regarding the ordering of the subject and modifiers in variable names.
Why is Clean Code suggesting avoiding protected variables?
Clean Code suggests avoiding protected variables in the “Vertical Distance” section of the “Formatting” chapter:
Method flags as arguments or as member variables?
I think the title “Method flags as arguments or as member variables?” may be suboptimal, but as I’m missing any better terminology atm., here goes:
Does it make a difference if I declare variables inside or outside a loop in Java?
Does it make a difference if I declare variables inside or outside a loop in Java?
Effective handling of variables in non-object oriented programming
What is the best method to use and share variables between functions in non object-oriented program languages?
Do there exist programming languages where a variable can truly know its own name?
In PHP and Python one can iterate over the local variables and, if there is only once choice where the value matches, you could say that you know what the variable’s name is, but this does not always work. Machine code does not have variable names. C compiles to assembly and does not have any native reflection capabilities, so it would not know it’s name. (Edit: per Anton’s answer the pre-processor can know the variable’s name).
Stack and heap – dynamic allocation question
Sources usually mention that dynamically created variables are allocated on the heap, while functions’ variables on the stack. Also the ones on the stack cease to exist automatically when e.g. the function which contains the variable exits. If I understand correctly, data fields of class are on the heap.
I do not understand, what is meant by ‘dynamic’? As I see it, when the code is running, anything being created is created dynamically on the fly, be it function variables or objects with variables inside them. I would be glad for simple explanation. Thanks
Temporary variables vs line length requirements
I’ve been reading Martin Fowler’s Refactoring. It is generally excellent but one of Fowler’s recommendations seems to be causing a little trouble.
How to name a variable when the word is both a noun and a verb
I have run into a corner-case problem with the general guidance of: