Disclaimer - I am a perl programmer. However I have my own issues with Perl as well.
But to the point - PHP. When I am forced to use PHP for something, I am constantly amazed at the poor design and horrific bloat of the language.
Case in point - there are no less than eleven different sort routines:
array_multisort
arsort
asort
ksort
natcasesort
natsort
rsort
sort
uasort
uksort
usort
In contrast, perl has a single 'sort' function.
One might think that having all these different routines might make it easier to perform a custom sort. Nothing further from the truth - in the end for my fairly trivial sorting exercise I had to revert to using the 'uksort' to sort by a user-defined function - but doing that is far more kludgy than in perl anyway (the sort procedure can't be defined inline).
Consistently, people who tell me that PHP is 'easy to use' have never used any other language.
Also consistently, people I talk to who use PHP after having used another language are universally scornful of PHP.
If this ever happens, I estimate it would take about 1 week for a group to appear, advocating 'open source' weather data collection, another week for some client/server software to be written, and about 3 months for effectively global weather data collection.
Do we have less mechanics today? Cars are more advanced and reliable than ever.
(Oh hang on, there aren't. They might be easier to drive and more technologically advanced, but there's a whole batch of different things that can go wrong now, that we need mechanics for).
Do we have less hospitals today? Newer drugs and safer practices surely mean that we need fewer doctors and beds than in the 'bad old days'
(What you say? New diseases? New ways of hurting oneself?)
Yes I know I'm agreeing with the FA, but really, what a stupid thing to question.
Although useful, it seems to have bugs that cause it to occasionally hit the RSS feed more often than the settings suggest, leading to slashdot headlines like:
Your Headline Reader Has Been Banned
You May Only Load Headlines Every 30 Minutes
In 72 Hours, Your Ban Will Be Lifted
It's quite entertaining to see these messages flowing across the ticker.
Of course, this could just as easily be a slashdot problem:-)
But to answer your question, no, they should not happen, but if one does and it happens to leak the DB password, you are fucked.
Wah?
If you are letting people connect to your database from the big bad internet, you just about may as well have a blank password!
Ideally, for a DB on the same machine, where the local machine is trusted (no shell accounts) then just don't use one! Setup a trust relationship, and forget about it.
If you have untrusted shell accounts, well, all bets are off anyway.
If you are a perl person, I can highly recommend you
investigate HTML::Mason as an alternative to PHP.
Visit the site if you want more details on what's good about it. In a nutshell:
Much easier seperation of presentation and logic
Easy templating and page filtering
Excellent but easy component caching (great for those slashdottings:-)
It's perl
OK, the last sounds like flamebait, but being perl means you get CPAN, which is a massive boon to any perl coder, no matter the style of development you are participating in.
Lastly, if you want to start from scratch, not having experience in either, can I humbly suggest you start with perl rather than PHP. You'll regret having to unlearn all the evil habits you get into once you start travelling the PHP road.
Although the documentation says 4.7-STABLE, I have it working with 4.7-RELEASE-p1. However several collegues are having trouble getting it to work on 4.7-RELEASE.
They did binary upgrades from the FreeBSD CD, I did the buildworld path:-)
Please don't start with MySQL. If you want to get into open source SQL, start with PostgreSQL.
Unless you will like unlearning your crufty MySQL habits a couple of years down the track...
Oh you want reasons?
AUTO_INCREMENT is inefficient (no caching) and lacks any versatility. Postgres can use any arbitary function to define default values, the most common of which would get the next value from a sequence. Which needn't be specific to that table.
Transactions. You need them, OK? If you think you don't you are wrong. And I shouldn't have to define my tables in some special way to get them either.
Performance - get over it guys, MySQL isn't the speed demon it used to be, in comparison to PostgreSQL. It's not a selling point no more.
Sub-selects, constraints. See point 2. If you don't think you need them, you probably do. Chances are you are doing a bunch of stuff in your code that you don't need to, that SQL should be doing for you much more safely and effeciently.
Yes, MySQL 4.0 has support for some of these features. But hey, it's not here, and even when it is, it won't be a proven, mature product for quite some time after that.
I have heard (unsubstatiated rumour here) that using a cell phone while in the air can net you free calls.
Presumably because the handoff from cell to cell happens much quicker than the billing system can detect. Or more likely, it assumes that such short connections are failures, and errs on the side of caution.
Please note, this is a rumour. Don't call Norway on your cell just because I said this:-) Unless you are in Norway.
I don't understand. Are you saying it's a hardware, or a software problem. You seem to say it's the hardwares fault, but you also say that a reinstall makes the problem go away.
Are you in Australia too? Where the users are conditioned to what Telstra is doing for internet bandwidth?
I think you have just had the wool over your eyes too long.
I'm in Australia. I also work for a broadband provider. Empirical evidence is my yardstick. There are people paying for our service, even though it's metered by megabyte.
The pricing is reasonable both for us and for the client base, so it remains consistent. The customer base is consistently growing. Each failure on the part of the big boys is a gain for us.
It's quite amazing that so many people still don't realize that TANSTAAFL.
Disclaimer - I am a perl programmer. However I have my own issues with Perl as well.
But to the point - PHP. When I am forced to use PHP for something, I am constantly amazed at the poor design and horrific bloat of the language.
Case in point - there are no less than eleven different sort routines:
In contrast, perl has a single 'sort' function.
One might think that having all these different routines might make it easier to perform a custom sort. Nothing further from the truth - in the end for my fairly trivial sorting exercise I had to revert to using the 'uksort' to sort by a user-defined function - but doing that is far more kludgy than in perl anyway (the sort procedure can't be defined inline).
Consistently, people who tell me that PHP is 'easy to use' have never used any other language.
Also consistently, people I talk to who use PHP after having used another language are universally scornful of PHP.
The linked article renders so badly in konqueror (KDE 3.2.2, FreeBSD) it wasn't even readable.
I guess that's telling me something.
In seven years he hasn't yet gotten around to putting the closing on the web page.
If this ever happens, I estimate it would take about 1 week for a group to appear, advocating 'open source' weather data collection, another week for some client/server software to be written, and about 3 months for effectively global weather data collection.
I must be some sort of user interface terrorist.
Do we have less mechanics today? Cars are more advanced and reliable than ever.
(Oh hang on, there aren't. They might be easier to drive and more technologically advanced, but there's a whole batch of different things that can go wrong now, that we need mechanics for).
Do we have less hospitals today? Newer drugs and safer practices surely mean that we need fewer doctors and beds than in the 'bad old days'
(What you say? New diseases? New ways of hurting oneself?)
Yes I know I'm agreeing with the FA, but really, what a stupid thing to question.
The more things change.....
- Your Headline Reader Has Been Banned
- You May Only Load Headlines Every 30 Minutes
- In 72 Hours, Your Ban Will Be Lifted
It's quite entertaining to see these messages flowing across the ticker.Of course, this could just as easily be a slashdot problem :-)
If you are letting people connect to your database from the big bad internet, you just about may as well have a blank password!
Ideally, for a DB on the same machine, where the local machine is trusted (no shell accounts) then just don't use one! Setup a trust relationship, and forget about it.
If you have untrusted shell accounts, well, all bets are off anyway.
Errr, surely rule #1 is to make sure you allow more mysql processes than maximum apache children?
Is it a common php 'admin' mindset to just hide errors rather than make sure they don't happen in the first place?
A bit like this?
Wow. You mean like this?
Katie lives at: http://www.netcraft.com.au/geoffrey/katie/
Visit the site if you want more details on what's good about it. In a nutshell:
- Much easier seperation of presentation and logic
- Easy templating and page filtering
- Excellent but easy component caching (great for those slashdottings
:-)
- It's perl
OK, the last sounds like flamebait, but being perl means you get CPAN, which is a massive boon to any perl coder, no matter the style of development you are participating in.Lastly, if you want to start from scratch, not having experience in either, can I humbly suggest you start with perl rather than PHP. You'll regret having to unlearn all the evil habits you get into once you start travelling the PHP road.
It already does:
- Live TV/timeshifting
- Program guide
- Record individual programs, or regular timeslots
- Basic editing of pre-recorded shows (bye bye ads!)
- Uses XMLTV for guide information, which has grabbers for many geographical areas.
- Kicks Ass
Get it now.Although the documentation says 4.7-STABLE, I have it working with 4.7-RELEASE-p1. However several collegues are having trouble getting it to work on 4.7-RELEASE.
:-)
They did binary upgrades from the FreeBSD CD, I did the buildworld path
Just because it's easy to setup a table on your webhoster, doesn't mean it's the right tool for the job. That's incredibly naive.
The 'R' in RDBMS is there for a reason.
Unless you will like unlearning your crufty MySQL habits a couple of years down the track...
Oh you want reasons?
- AUTO_INCREMENT is inefficient (no caching) and lacks any versatility. Postgres can use any arbitary function to define default values, the most common of which would get the next value from a sequence. Which needn't be specific to that table.
- Transactions. You need them, OK? If you think you don't you are wrong. And I shouldn't have to define my tables in some special way to get them either.
- Performance - get over it guys, MySQL isn't the speed demon it used to be, in comparison to PostgreSQL. It's not a selling point no more.
- Sub-selects, constraints. See point 2. If you don't think you need them, you probably do. Chances are you are doing a bunch of stuff in your code that you don't need to, that SQL should be doing for you much more safely and effeciently.
Yes, MySQL 4.0 has support for some of these features. But hey, it's not here, and even when it is, it won't be a proven, mature product for quite some time after that.Errr, no.
If you can't join two tables together, you don't know SQL. Not even at beginner level. Zip, nada. Not for fun or profit.
If you think you need SQL for a dataset represented by a single table, you don't.
If you don't like it, vote with your feet. But Redhat are making things better, not worse.
I am not a pilot :-)
:-) Unless you are in Norway.
I have heard (unsubstatiated rumour here) that using a cell phone while in the air can net you free calls.
Presumably because the handoff from cell to cell happens much quicker than the billing system can detect. Or more likely, it assumes that such short connections are failures, and errs on the side of caution.
Please note, this is a rumour. Don't call Norway on your cell just because I said this
If it's so good, why isn't it the default?
What is the con?
I don't understand. Are you saying it's a hardware, or a software problem. You seem to say it's the hardwares fault, but you also say that a reinstall makes the problem go away.
I have plenty of servers that move more data than that through their filesystems with uptimes measured in months.
They're still on the original install.
If that's the truth, you're looking at OS bugs. Filesystems don't "wear out" just because you're using them a lot.
I'm in Australia. I also work for a broadband provider. Empirical evidence is my yardstick. There are people paying for our service, even though it's metered by megabyte.
The pricing is reasonable both for us and for the client base, so it remains consistent. The customer base is consistently growing. Each failure on the part of the big boys is a gain for us.
It's quite amazing that so many people still don't realize that TANSTAAFL.