The main fault of PHP is that it lowers the educational cost of entry to the point that incompetent people can build functional but insecure code.
Well, that's one of its problems, but that's hardly what I'd call its main fault. Though I use it quite a bit, PHP is not an easy-to-use language if you care about correctness, robustness or security. I have a webpage that lists, in point form, some of the criticisms of PHP that I have accumulated over the last few years. The page is about PHP 4, since that's still what my customers' systems are using, but some of the criticisms apply to PHP 5 as well.
Speaking of which, is there a way to do this in PHP? I've never seen a PHP script that did anything like this (which is probably why bugtraq is 99% php SQL injection holes).
Most people probably aren't aware of it, but several years ago, I wrote a few short scripts for PHP 4 that specifically address this problem. Currently-supported database backends are MySQL and anything that DBX supports, but it wouldn't take much to adapt it to PostgreSQL.
It basically lets you write code like this:
require_once "mysqlext.php"; $link = mysql_connect(...); $results = mysql_execute($link, "SELECT a,b,c FROM foo WHERE bar=? and baz=?", array($bar, $baz));
It doesn't have the performance benefits that real prepared statements have, but I still find it handy for typical PHP4 database work.
The code is released under the MIT license, so feel free to use it.
I'd rather have a Conservative or NDP minority government, or possibly a Conservative-NDP coalition government. The reason is that, while I don't trust either party to run the country effectively by itself, I think the two parties (along with the rest of Parliament) would prevent each other from doing any major damage.
I don't believe that parliamentary democracy, by itself, is a means for achieving an ideal form of government. Rather, it is a system that serves as a sort of 'pressure relief valve', effecting regime change through established, non-violent mechanisms, rather than through armed revolution or invasion by foreign powers. Every now and then, the people who comprise the "regime" (government) forget that although they are in charge of day-to-day governance, they can be replaced by others if they do not, collectively, act in the best interests of the people who pay them.
The Gomery report suggests that, at worst, the Liberals themselves are corrupt, or, at best, they didn't care to prevent corruption. It appears as though the Liberals believe that they're not accountable, because people are too afraid to vote for someone else. Personally, I'm afraid of what will happen if we confirm this notion by re-electing them. I think it's time to replace the Liberals, even if only for one term, to remind them who's boss.
My point is that just because an idea can appear trivial and obvious, doesn't mean that it shouldn't be protected.
So, you're saying that having an idea, simply by being non-trivial and non-obvious, is grounds for preventing anyone else from using that idea for 20 years (what you call being "protected")?
Well, that's one of its problems, but that's hardly what I'd call its main fault. Though I use it quite a bit, PHP is not an easy-to-use language if you care about correctness, robustness or security. I have a webpage that lists, in point form, some of the criticisms of PHP that I have accumulated over the last few years. The page is about PHP 4, since that's still what my customers' systems are using, but some of the criticisms apply to PHP 5 as well.
Probably nothing. I've just never used it.
Most people probably aren't aware of it, but several years ago, I wrote a few short scripts for PHP 4 that specifically address this problem. Currently-supported database backends are MySQL and anything that DBX supports, but it wouldn't take much to adapt it to PostgreSQL.
It basically lets you write code like this:
It doesn't have the performance benefits that real prepared statements have, but I still find it handy for typical PHP4 database work.
The code is released under the MIT license, so feel free to use it.
Some of us Canadian techies know about those, as well as Part VI of the Criminal Code of Canada. :P
I don't believe that parliamentary democracy, by itself, is a means for achieving an ideal form of government. Rather, it is a system that serves as a sort of 'pressure relief valve', effecting regime change through established, non-violent mechanisms, rather than through armed revolution or invasion by foreign powers. Every now and then, the people who comprise the "regime" (government) forget that although they are in charge of day-to-day governance, they can be replaced by others if they do not, collectively, act in the best interests of the people who pay them.
The Gomery report suggests that, at worst, the Liberals themselves are corrupt, or, at best, they didn't care to prevent corruption. It appears as though the Liberals believe that they're not accountable, because people are too afraid to vote for someone else. Personally, I'm afraid of what will happen if we confirm this notion by re-electing them. I think it's time to replace the Liberals, even if only for one term, to remind them who's boss.
Sigh. See RFC 3675.
So at $50,000 a pop... Hey, is that where the **AA is getting their "$X billion lost to piracy" figures?
Back in my day, "Dolby" meant "low pass filtering"!
*groan*
"This exact comment has already been posted. Try to be more original..."
He just misspelled the German word meaning "thereby".
Sperm donation is only easy for men, you insensitive clod!
-1, Flamebait... Obviously the moderator hasn't used Netware either...
Oh right, because *of course* that technology would only be covered by *one* patent...
So, you're saying that having an idea, simply by being non-trivial and non-obvious, is grounds for preventing anyone else from using that idea for 20 years (what you call being "protected")?
Bah! :P
"I haven't seen the problem, therefore no problem could possibly exist" is a troll.
"But if we change the constitution..."
"Then we can make all sorts of crazy laws!"
Does your supervisor know you're reading Slashdot? Get back to work!
Heh. The one sitting beside me has a 0, but no 1. It also doesn't seem to be able to type characters in a straight line... :-/
That's *an* answer, but it's not the *ultimate* answer, which of course is a1d0c6e83f027327d8461063f4ac58a6.
For reference, here is some basic information about the different time scales.
WTF? Who cares?
If there are Perl, Ruby, or Python implementations in Java, then they are at least as portable as Java. :P
You're from another county, aren't you? ;)