Can you program websites, too?

Started by
41 comments, last by Chad Smith 11 years, 4 months ago

[quote name='way2lazy2care' timestamp='1355232911' post='5009411']
You know they still build a lot of houses out of brick and mortar...


And they are more expensive, slower to build and far less energy efficient. What's your point? biggrin.png[/quote]
They're more expensive, but it really doesn't take that much more time to build these days and they're more energy efficient than a lot of new houses these days. The point is you're generalizing an old methodology as a bad methodology. Just because it's old doesn't mean it does not have situations where it is better.


PHP's positives are also negative as well. It has a very active community. The majority of it's community however are amateurs. It's very much a case of the blind leading the blind and occasionally someone sees the light and realize how bad PHP is as a language and moves on to something else.[/quote]
This is the same with pretty much every community. I have seen tons of bad C++ code. I have seen tons of bad Java code. I have seen tons of bad javascript. The problem isn't that most php developers are amatuers; the problem is that most people are amatuers. Maybe php's nature of being friendly to novice coders amplifies the voice of novices in communities, but I wouldn't say by any means that php is in isolation in having a large base of amatuers.

What I'm saying is, if you're new to web development and looking to learn, stay away from PHP. It's a black hole of poor language design, lousy management and amateur users.
[/quote]
This might be what you're trying to say, but it is coming across more like, "PHP SUCKS. YOU SUCK BECAUSE YOU THINK IT HAS REASONABLE USE CASES. YOU ALL KNOW NOTHING ABOUT WEB DEVELOPMENT. LEARN TO USE A REAL LANGUAGE SCRIPT KIDDIES." It may not be quite how you intend to come across, but you're being very abrasive toward people who hold differing viewpoints and outside of some semantic errors the points being made by them are at least worth voicing.
Advertisement

This is the same with pretty much every community. I have seen tons of bad C++ code. I have seen tons of bad Java code. I have seen tons of bad javascript. The problem isn't that most php developers are amatuers; the problem is that most people are amatuers. Maybe php's nature of being friendly to novice coders amplifies the voice of novices in communities, but I wouldn't say by any means that php is in isolation in having a large base of amatuers.


There is bad code and bad programmers in every language. What I'm talking about is the core community. The core ASP.NET MVC community for instance is very sharp and they are actively improving patterns and practices as well as having significant influence over the direction of the MVC framework itself. Same with node. The code team is not true of the core PHP community. They stubbornly defend every blemish and wart the language has, and lets be honest, there are a lot of them.

This might be what you're trying to say, but it is coming across more like, "PHP SUCKS. YOU SUCK BECAUSE YOU THINK IT HAS REASONABLE USE CASES. YOU ALL KNOW NOTHING ABOUT WEB DEVELOPMENT. LEARN TO USE A REAL LANGUAGE SCRIPT KIDDIES." It may not be quite how you intend to come across, but you're being very abrasive toward people who hold differing viewpoints and outside of some semantic errors the points being made by them are at least worth voicing.
[/quote]


Fair enough. I'm okay with that. If I save even one developer from stumbling into the abyss that is PHP due to my dramatic arguments against it, I am happy. ;)

To be fair though, this thread is about a newbie wanting to get into web development. Not about choosing a web server technology from a business standpoint.
php is cheap, available virtually anywhere, reasonably fast and has a huge existing codebase. That's about it. It's ideal to get started with web development and should be good for small to medium sized projects.
Is it a good language? No. But since the competition in this market is so strong it is often the best coice

This is the same with pretty much every community. I have seen tons of bad C++ code. I have seen tons of bad Java code. I have seen tons of bad javascript. The problem isn't that most php developers are amatuers; the problem is that most people are amatuers. Maybe php's nature of being friendly to novice coders amplifies the voice of novices in communities, but I wouldn't say by any means that php is in isolation in having a large base of amatuers.



The difference is you can write good code in C++, Java , javascript. Php is just broken.

Seriously, did you not read the article that was posted? And he's not alone either.

This is php.



php is cheap, available virtually anywhere, reasonably fast and has a huge existing codebase. That's about it. It's ideal to get started with web development and should be good for small to medium sized projects.
Is it a good language? No. But since the competition in this market is so strong it is often the best coice


So what? The same criteria can be applied to python or asp.net without the supermassive black hole level of suck that is php.
Only use it if you have a bloody good reason to.
if you think programming is like sex, you probably haven't done much of either.-------------- - capn_midnight
As of when I posted this:
IE ( 26% market share ) doesn't support 95% of HTML5
Chrome ( 37% market share ) doesn't fully implement HTML5

That means that over 70% of web browsers that click on one of my sites, will have issues ( Source: HERE )
"Failing Gracefully" usually refers to making some Java Script equivalent .... It takes 5 times longer to do this ..... also have to deal with browsers that do not have Java Script ....

Also, PHP has it's own stack trace when something goes wrong - I get all sorts of orange boxes on my testing server telling me exactly what broke, and were it is.

** Post a link to an anti PHP page that doesn't worship another language, and I may read more than the first paragraph.

I cannot remember the books I've read any more than the meals I have eaten; even so, they have made me.

~ Ralph Waldo Emerson


A of when I posted this:
IE ( 26% market share ) doesn't support 95% of HTML5
Chrome ( 37% market share ) doesn't fully implement HTML5
That means that over 70% of web browsers that click on one of my sites, will have issues ( Source: HERE )
"Failing Gracefully" usually refers to making some Java Script equivalent .... It takes 5 times longer to do this ..... also have to deal with browsers that do not have Java Script ....



Once again your ignorance is showing. You act as if all browsers have to support 100% of HTML5 features for any of it to be useful which is completely untrue. You are also implying that javascript is an alternative to HTML5 when in reality HTML5 relies heavily on Javascript and CSS.

Also, PHP has it's own stack trace when something goes wrong - I get all sorts of orange boxes on my testing server telling me exactly what broke, and were it is.[/quote]
Every modern language supports stack traces. Not exactly a huge selling feature of PHP.


** Post a link to an anti PHP page that doesn't worship another language, and I may read more than the first paragraph.
[/quote]
I already did and you had trouble comprehending it.

IE ( 26% market share ) doesn't support 95% of HTML5
Chrome ( 37% market share ) doesn't fully implement HTML5

That means that over 70% of web browsers that click on one of my sites, will have issues ( Source: HERE )


Nothing fully implements HTML5. The standard isn't even due to be finalised until 2014.

But in practical terms there are plenty of sites using HTML5 right now, because the majority of it works fine. Chrome, for instance, supports more than 90% of the spec.
Safari, IE 10 and Firefox still lag behind, but they're getting there. Even IE9 has some HTML5 support.

Not to mention your stats are ignoring mobile browsing which is the fastest growing market segment.
if you think programming is like sex, you probably haven't done much of either.-------------- - capn_midnight
@ tstrimple

One of your arguments was that PHP has no debugging capabilities.

The story in question has a lot of ... code torture and off the wall statements - I can not take something that makes statements like this seriously.

3 random examples.

array() and a few dozen similar constructs are not functions. array on its own means nothing, $func = "array"; $func(); doesn’t work.
[/quote]
^^ No crap, you didn't declare $func as a definition or function. It was declared as a string.

@fopen('http://example.com/not-existing-file', 'r');

What will it do?

  • If PHP was compiled with --disable-url-fopen-wrapper, it won’t work. (Docs don’t say what “won’t work” means; returns null, throws exception?) Note that this flag was removed in PHP 5.2.5.
  • If allow_url_fopen is disabled in php.ini, this still won’t work. (How? No idea.)
  • Because of the @, the warning about the non-existent file won’t be printed.

[/quote]
If you disable fopen in the config files, it won;t work - this is a no brainer ! If you disable the warning using "@", it won't be printed - this is also a no brainer

Global variables need a global declaration before they can be used.
[/quote]
No #### Sherlock. Almost all oo languages have global and local variables.

I cannot remember the books I've read any more than the meals I have eaten; even so, they have made me.

~ Ralph Waldo Emerson


One of your arguments was that PHP has no debugging capabilities.


Not no debugging, just bad debugging. There is no interactive debugger for example, and PHP's parsing error messages are often useless.

http://phpsadness.com/sad/44


array() and a few dozen similar constructs are not functions. array on its own means nothing, $func = "array"; $func(); doesn’t work.
[/quote]
^^ No crap, you didn't declare $func as a definition or function. It was declared as a string.[/quote]


Apparently you don't even understand the language you're trying to defend. In PHP if you throw parens after a variable it will try to execute the string value as a function name.

http://php.net/manual/en/functions.variable-functions.php

The point the author was making was that php has a handful of things that look like functions, but are actually language constructs and behave differently than actual functions.



@fopen('http://example.com/not-existing-file', 'r');

What will it do?

  • If PHP was compiled with --disable-url-fopen-wrapper, it won’t work. (Docs don’t say what “won’t work” means; returns null, throws exception?) Note that this flag was removed in PHP 5.2.5.
  • If allow_url_fopen is disabled in php.ini, this still won’t work. (How? No idea.)
  • Because of the @, the warning about the non-existent file won’t be printed.

[/quote]
If you disable fopen in the config files, it won;t work - this is a no brainer ! If you disable the warning using "@", it won't be printed - this is also a no brainer[/quote]

Once again, you're missing the point even though he summed it up for you nicely right after.

"I can’t tell how this innocuous function call will behave without consulting compile-time flags, server-wide configuration, and configuration done in my program. And this is all built in behavior."


Global variables need a global declaration before they can be used.
[/quote]
No #### Sherlock. Almost all oo languages have global and local variables.
[/quote]

It's not the concept of globals that's the problem, it's how it implements globals. Most languages will default to the global variable unless you specifically say that you are creating a local variable. PHP does the opposite where it will automatically create a local variable unless you specifically ask to use the global version.
@tstrimple. Give up man, it's clear he doesn't have a clue what he's talking about.

Frankly, after reading some of his posting history, I'm not surprised that he can only get work 4 months a year, despite his "technical certifications out the ###".
if you think programming is like sex, you probably haven't done much of either.-------------- - capn_midnight

This topic is closed to new replies.

Advertisement