|
I can't get the site to load. Perhaps the Code Project effect has taken it down. Or maybe the site was written in PHP and it's functioning as should be expected.
|
|
|
|
|
|
First you've got the language itself which is one giant WTF but then you're also faced with the sample code that floats round the web which includes but is not limited to any of the following:
No exception handling
No logging
Suppressing errors using "@" and simply letting the program run on
Scarce use of functions, let alone any proper encapsulation
Code reuse abuse via copypasta
Organisation of code through grouping unrelated bits of PHP into files like "App_Core.php.inc"
Database access code that formats and returns results as HTML
Using crontab to call a PHP script that then uses curl to call another PHP script that resides on an Apache server, because more potential points of failure mean that the chances of something failing at one specific point are greatly reduced
Opening a DB connection at the start of every request and closing it right at the end of every request, regardless of whether you need it or not
Creating a db schema that doesn't actually enforce relationships and implements FK relationships as comma-separated values in the PK table
I'm sure there are actually some very good PHP programmers out there, which begs the question: if they're technically well-versed, what are they doing with PHP?
|
|
|
|
|
I think PHP is just fine for small projects. It comes free with Linux hosting, so it's cheaper than the alternatives.
|
|
|
|
|
Yeah, if you have a small project and you are comfortable with PHP already, sure, go ahead and use it. Although if you are just getting into programming, or just want a DIY project, I think spending your time with Rails or ASP.NET would be a better decision.
ed welch wrote: It comes free with Linux hosting
That's like saying that ASP.NET comes free with Windows hosting. Many hosting providers I've used give you the option of Windows or Linux for the same price.
Be The Noise
|
|
|
|
|
Karl Sanford wrote: Many hosting providers I've used give you the option of Windows or Linux for the same price.
Last time I checked that was not the case
|
|
|
|
|
Go Daddy, basic plan is $5/month, Windows or Linux.
Be The Noise
|
|
|
|
|
That's just one company. There's a lot who offer no Windows hosting at all. In all fairness, some Linux hosting support asp via mono (don't know if that's the same thing though)
|
|
|
|
|
I did a quick search on Google, and all the ones I found had PHP free...as well as Ruby, Perl, and Python (and the first result also offered Windows at the same price as Linux, with .NET support). I think you're have to search hard for a host that offered PHP and none of at least those other 3 options, so I don't think price is a realistic reason.
|
|
|
|
|
But at the same time there are more options available for Linux hosting... so it does work out cheaper.
|
|
|
|
|
Than ASP.net perhaps, but my point is most of the other alternatives are likely just as cheap, so the argument doesn't really work as a general statement.
|
|
|
|
|
Fair enough. I agree in that case
|
|
|
|
|
Ok, this post is flame bait in disguise; some people think it's the best tool in the world for all projects, but as long as they are locked up in the funny house at the end of the day, we tolerate them and move on. PHP has its place, which is not for important or complex projects; it's just a messy scripting language for non-programmers that sacrifices everything to have a low learning curve.
Also, the best PHP devs are the ones who learned real programming in another language and only use PHP for convenience. Being a PHP expert is like being an expert food critic who specializes in recommending the finest fare from McDonalds, Burger King, and Taco Bell.
modified 31-May-12 10:53am.
|
|
|
|
|
jesarg wrote: the best PHP devs are the ones who learned real programming in another language and only use PHP for convenience
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
Terrence Dorsey wrote: It just works.
agreed.
i use it for all my little web page needs. it works fine for what i need it to do.
|
|
|
|
|
Our intrepid hero is working on a shell script that can tell you the most recent year that a specific date occurred on a specified day of the week—for example, the most recent year when Christmas occurred on a Thursday. There are, as usual, nuances and edge cases that make this calculation a bit tricky... Bashing together a calendar.
|
|
|
|
|
A/B testing is used far too often, for something that performs so badly. It is defective by design. With a simple 20-line change to how A/B testing works, that you can implement today, you can always do better than A/B testing -- sometimes, two or three times better. Statistics are hard for most people to understand, and that's why they avoid this technique.
|
|
|
|
|
In early 1982, the Lisa software team was trying to buckle down for the big push to ship the software within the next six months. Some of the managers decided that it would be a good idea to track the progress of each individual engineer in terms of the amount of code that they wrote from week to week. It's hard to measure progress by lines of code.
|
|
|
|
|
In the last five years, LLVM has evolved from an academic project to the universal back-end of C, C++, and Objective C compilers. The key to its success is its performance and adaptability, both of which derive from its unique design and implementation. This isn't your father's old compiler.
|
|
|
|
|
Flame may be the most powerful computer virus in history, and a nation-state is most likely to blame for unleashing it on the World Wide Web. Kaspersky's chief malware expert Vitaly Kamlyuk shared with RT the ins and outs of Stuxnet on steroids. Out of the Stuxnet and into the Flame.
|
|
|
|
|
In the startup community there is a term called minimum viable product. I’m coining the term Minimum Usable Design, and that is when you reach your 50% mark for your design. If you can’t use your design after you have reached 50% (or a person can’t understand at least 50% of what is going on) then you haven’t reached the 50% mark yet. By no means does this imply that you should show your design to the public at the 50% mark, but you can use it as a way to gauge your progress. 80% of the effort goes into 20% of the worry about 50% of what's still to be done.
|
|
|
|
|
There are many, many styluses for the iPad out there. I know, because I’ve looked at a lot of them, putting together reviews (and drawings) for nearly three dozen pens and writing implements for tablets and handling even more. But even the most extensive chart doesn’t always get to the heart of the question that tablet owners want to know: Which stylus is well-suited for what I want to do? The pen is mightier?
|
|
|
|
|
Tom Hobbs argues that UI designers need to stop aping real-life bookshelves and suede calendars like Apple does, and go for a new philosophy: just enough is more. Skeptical about skeuomorphism.
|
|
|
|
|
I agree with most of that, but...
"Metro is not just design for design’s sake."
Oh, isn't it? If not, why didn't they just leave well enough alone?
|
|
|
|
|
I spent a few weeks reformatting and publishing four of my longer essays on the Kindle Direct Publishing platform. The process was a hodge-podge of snippets and trial and error. I wish I had this template from the start. Now I do. So I hope it helps you. Retro-publishing: command-line tools for creating better e-books.
|
|
|
|