Craige

Canada

Mar
27
awarded Popular Question
Jan
27
awarded Notable Question
Nov
4
awarded Yearling
Nov
4
awarded Yearling
Nov
4
awarded Popular Question
Sep
16
awarded Yearling
Aug
14
awarded Self-Learner
Jul
27
awarded Student
Jul
27
answered SSH Reverse Port Forward Bind to address
Jul
27
asked SSH Reverse Port Forward Bind to address
Jul
15
comment PHP global or $GLOBALS
...came from, whether or not it is set, or what other code may be relying on this magic global variable. Globals are hell, and should be avoided for saner coding practices whenever possible (Which is 98% of the time)
Jul
15
comment PHP global or $GLOBALS
@JasonWoof - This answer is suggesting NOT using the global directive. I think you mean the function definition. In either case, in well written code, methods should be short, clear and concise. Sometimes, you just need to modify external values. The key is to make it clear that you are doing that. Passing by reference is the standard way to achieve this.It is more concise than using globals because you know exactly where that value is coming from; it is being passed in by the code that called the method. If you were to use a global, you have no concrete idea as to where that value...
Jul
12
comment PHP global or $GLOBALS
@JasonWoof - How is his code unreadable? This is the standard way to do things.
Jul
8
awarded Nice Question
Jul
5
awarded Notable Question
May
30
awarded Enlightened
May
30
awarded Nice Answer
May
25
answered Difference between sending a message and emitting it
May
23
comment Is it a bad practice to modify code strictly for testing purposes
What assurance does he have that the code "works"?
May
10
comment SO or Programmers.se?
@TronicZomB - Perhaps that is the best path. It seems the community thinks it belongs on P.SE, and as I originally thought it was a grey area, that's perfectly acceptable to me.
1 2 3 4 5