![]() | |
![]() |
| | Thread Tools | Display Modes |
#31
| |||
| |||
|
|
in comp.infosystems.www.authoring.site-design, Bruce Lewis wrote: Lauri Raittila <lauri (AT) raittila (DOT) cjb.net> writes: in comp.infosystems.www.authoring.site-design, Bruce Lewis wrote: Please post some example code illustrating how easy it is to learn PHP for some specific trivial case. I will respond with my own example code. Only PHP thing that is more or less ready I have is this http://lauri.cambridgelaan.nl/index.phps (and result is http://lauri.cambridgelaan.nl/) |
|
Does: - finds images in folder - makes gallery out of them, first time it produces thumbs. It was very easy to do as I wound most of the code ready. I was able to read and understand what it does whitout any learning, to change functionality a bit I needed to learn some stuff. |
#32
| |||
| |||
|
|
Don't look at comments for evaluating the readability of a language. Look at code, e.g. $title = ereg_replace("[^/]*\$", "", $title); |
|
$output .= "<div class='size'>\n" . sprintf("%.02f", (float)(filesize($jpegs[$i]) / 1024)) . 'KB /div>'; |
|
Code like the lines above is not what you want to put forth when trying to prove PHP much easier than the alternatives. I'm still waiting for a good example. |
#33
| |||||
| |||||
|
|
Bruce Lewis <brlspam (AT) yahoo (DOT) com> writes: Don't look at comments for evaluating the readability of a language. Look at code, e.g. $title = ereg_replace("[^/]*\$", "", $title); I think the lack of readability of that line says more about regular expression syntax than it does about PHP. |
|
Okay, the "%.02f" is a little odd-looking, but on the other hand it's standard string formatting syntax as seen in sprintf() functions in many languages. Like regex, it's not really the fault of PHP if the convention it follows is incomprehensible to the beginner [1]. |
|
[1] PHP's date() function did implement its own date format syntax, rather than sticking to the standard date format syntax, and this has not been popular. |
|
Code like the lines above is not what you want to put forth when trying to prove PHP much easier than the alternatives. I'm still waiting for a good example. Easier to read or easier to write? |
|
I've not found well-written PHP code any easier to read than well-written code in other imperative languages. I've not found poorly-written PHP code any harder to read than poorly-written code in other imperative languages. |
#34
| |||||
| |||||
|
|
Lauri Raittila <lauri (AT) raittila (DOT) cjb.net> writes: in comp.infosystems.www.authoring.site-design, Bruce Lewis wrote: Lauri Raittila <lauri (AT) raittila (DOT) cjb.net> writes: in comp.infosystems.www.authoring.site-design, Bruce Lewis wrote: Please post some example code illustrating how easy it is to learn PHP for some specific trivial case. I will respond with my own example code. Only PHP thing that is more or less ready I have is this http://lauri.cambridgelaan.nl/index.phps (and result is http://lauri.cambridgelaan.nl/) Thanks for stepping in when kaeli didn't respond, but a 300+ line example is a little too big to keep the discussion focused. Hopefully kaeli will post a smaller example. |
|
Does: - finds images in folder - makes gallery out of them, first time it produces thumbs. It was very easy to do as I wound most of the code ready. I was able to read and understand what it does whitout any learning, to change functionality a bit I needed to learn some stuff. You could understand what it does by reading the comments. |
|
Don't look at comments for evaluating the readability of a language. |
|
Look at code, e.g. $title = ereg_replace("[^/]*\$", "", $title); $output .= "<div class='size'>\n" . sprintf("%.02f", (float)(filesize($jpegs[$i]) / 1024)) . 'KB /div>'; |
|
Code like the lines above is not what you want to put forth when trying to prove PHP much easier than the alternatives. I'm still waiting for a good example. |
#35
| |||
| |||
|
|
Chris Morris <c.i.morris (AT) durham (DOT) ac.uk> writes: I've not found well-written PHP code any easier to read than well-written code in other imperative languages. I've not found poorly-written PHP code any harder to read than poorly-written code in other imperative languages. I'd prefer not to restrict the discussion to just imperative languages, my references to Java objects in this post notwithstanding. |
#36
| |||
| |||
|
|
Nobody's saying PHP isn't widely installed. I'll just say that having it already installed is where the ease of use ends. |
#37
| |||
| |||
|
|
I'm still curious: I developed in many different languages and only very few (like VB) felt as bad as PHP. So what are people seeing in PHP? |
#38
| |||
| |||
|
|
Eventually, if you are doing something advanced, PHP will start to be an obstacle - then you can whip up your own C++ extension to PHP. |
|
That should keep even the most advanced programmers happy, and a lot of people have done exactly that. If you want to be really cool, do a template based C++ extension to PHP. |
#39
| |||
| |||
|
|
If you have a project that requires six programmers working for two years, yes VB or PHP is going to turn into a catastrophe, and the startup will go down the tubes, but if you have one less-than-experienced programmer, and the job needs to go live before the end of the month, PHP/MySQL is the way to go. |
![]() |
| Thread Tools | |
| Display Modes | |
| |