Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror

Slashdot videos: Now with more Slashdot!

  • View

  • Discuss

  • Share

We've improved Slashdot's video section; now you can view our video interviews, product close-ups and site visits with all the usual Slashdot options to comment, share, etc. No more walled garden! It's a work in progress -- we hope you'll check it out (Learn more about the recent updates).

×

Comment: Re:who cares? (Score 3, Informative) 191

by Literaphile (#44804619) Attached to: A Tale of Two MySQL Bugs
  1. MSSQL is ahead by a whopping 8 points in that scale, 1313 to 1305. Next month, the scores could be reversed.
  2. All that "survey" really measures is how much people are talking about the systems, not their actual usage. I'll bet you'll find MySQL installed on more active servers than Oracle or MSSQL, especially since it's the go-to choice for shared hosting.

Comment: Re:Facebook? (Score 1) 155

by Literaphile (#44219381) Attached to: Book Review: Programming PHP 3rd Edition
As someone who also works with PHP every working day, I'd just like to respond to your examples of "what went wrong":

- Arrays and hashes are the same data structure, for no readily apparent reason. Also, the simplest way of using that data structure is "array(a,b,c,...)", not "[a,b,c, ...]" like everyone else.

So? Does this gripe have any practical implications? Or is it just a whine for a whine's sake? Also, as of PHP 5.4 (which has been March 2012 BTW), you CAN use the [a,b,c] syntax to create arrays.

- All variables start with $, in imitation of Perl, but don't use the @ or % prefixes the way Perl does, instead just pretending everything's a scalar even though it's not.

Again - so what? You presumably learned how PHP variables work, so you're doing OK. Don't worry about Perl when you're using PHP.

- For a long time, OOP was an afterthought.

But it's not an afterthought now. Or are you still using PHP 4?

- Unlike other scripting languages like Python, Ruby, and Perl, PHP can't figure out which files to include for you when you reference something outside of the current file. Instead, it offers a global facility called an "autoloader" that allows you to write your own code to tell it how to find it, which completely breaks when multiple libraries have competing autoloaders trying to pick up two different classes with the same name.

Again, don't worry about other languages. You're using PHP. And, more importantly, why are you using libraries with their own autoloaders?

- Library functions display no consistency whatsoever. Some are camelCase, some are under_scored. Some search functions put the needle before the haystack, some the other way around.

I agree that this is annoying. But is it a show-stopper?

- Some operators are funky: Values can be equal without being the same thing, for example.

Once again: so what? It's not random behavior. Learn how this stuff works and then move on with your life.

- A significant number of errors, instead of generating exceptions that can be caught and handled, generate fatal errors, which crash your application no matter what. By comparison, Perl, Python, Ruby, and Java allow you to handle almost any error.

What do you mean by "handle"? If you mean catch and log, then PHP allows you to catch all errors, including fatal ones (see register_shutdown_function for example). If you mean "recover from", I would suggest that attempting to "recover" from a fatal error is a very bad idea. A fatal error means that something is seriously wrong with your application - the "recovery" should be fixing it, not pushing it under the rug.

Your points just touch on the same old, tired "but it's not like $randomLanguageName and therefore it's bad!" If you constantly compare PHP - or any language - to other languages than I'm afraid you'll have a long road to hoe. If PHP is your chosen tool - as it is for me - learn it inside and out and stop comparing it to other languages.

Comment: Re:As a guy that was a stay at home dad for 7 year (Score 5, Funny) 832

by Literaphile (#43613211) Attached to: So What If Yahoo's New Dads Get Less Leave Than Moms?

Nothing motivates you better to go back to the grind of corporate work than 7 years of shitty diapers. I love my kids, but 7 years of diapers was enough. Much happier with a regular paycheck and a nanny.

Maybe your problem was leaving your kids in diapers until they were 7?

Nothing in progression can rest on its original plan. We may as well think of rocking a grown man in the cradle of an infant. -- Edmund Burke

Working...