I also severely dislike the Systems Hungarian notation, where the type of a variable is part of the variable name. I'm not sure where that came from; perhaps it is the repetition that annoys me.
Popularising it is Microsoft's fault. The original instigator is probably languages that infer type from the initial letter of a variable e.g. IMPLICIT types in FORTRAN.
I mentioned it, of course, because of Perl sigils ($ for scalars, @ for arrays, and % for hashes, & for subroutines, and * for typeglobs).
I thought about this for a while, and I think that the variable name represents the
purpose of the variable for me in my mind at the abstract level, and having the type or form associated with the name hinders my ability to keep to the abstract level, and drags my feeble mind to the implementation level where I worry about such implementation details. Essentially, it makes it more difficult for me to bounce between complexity levels; me being not capable of encompassing huge complex structures at once at multiple different complexity levels... I'm certain that for others the sigils (and even Systems Hungarian type prefixes) help them in other ways, and see this as a stupid limitation, but this is my only mind I have to work with, and I just have to deal with its weaknesses the best I can.
What do you use to *debug* PHP?
A very strong degausser on the storage media. That should teach it.
What about PHP code that is rock solid? Granted, that stuff is basically write-only code.
"This is absolutely paranoid" is something I have heard from more than one person reading my PHP code. Several times, weeks or months after putting the code into production, a coworker has heard of a new Apache attack pattern, and emails me in panic, just to get a reply from me pointing out which part of my paranoid filter completely defuses that particular attack.
I used to giggle and cackle to myself with glee, when looking at Apache log files full of failed access attempts with some part of the query being
../../../../windows/system/cmd.exe, query strings containing
%00, and similar shenanigans.. Like I said earlier, my PHP code sanitized even the CGI environment variables. Usually, I convert raw and urlencoded Western European non-ASCII letters (including ÅÄÖØÆåäöøæ) to their closest ASCII 'equivalents', then filter stuff like consecutive
. and
/ out (eliminating any such consecutive pairs,
./ and
/. altogether), and finally filter out all non-safe characters out. The end result is that no path shenanigans can pass through, no matter what you try.
But, it wasn't
fun writing it in PHP, because PHP has overlapping orthogonal interfaces doing the exact same thing (both OO and non-OO imperative), and it was basically impossible to see how the language developers envisioned it being used
properly. Especially during the efforts of making PHP easier for non-programmers to use "safely" –– things like magic quote support ––, one had to actively fight against idiocy, to make things secure. One could trust nothing, and really needed to be paranoid, or the PHP devs helpful attempts would bite one in the ass, hard. At least Python has PEPs, for what they're worth.
(And I cannot tell you how often I had to endure the question, "Are you sure this is necessary? Couldn't we just do
simpler-but-less-secure-method?". Still makes me sad and depressed getting asked that, actually.)
I also severely dislike the Systems Hungarian notation, where the type of a variable is part of the variable name. I'm not sure where that came from; perhaps it is the repetition that annoys me.
Hungarian notation was invented by an actual Hungarian, Charles Simonyi, originally at Xerox PARC, later of Microsoft.
By 'that', I was referring to my severe dislike, not to Systems Hungarian.
That is, I don't know where my severe dislike of Systems Hungarian stems from. I do know how and where Systems Hungarian came about.
Apologies for being unclear; me fail English