- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
I'm a PHP programmer and I wish it would die. (Fortunately I know a few other languages as well)
Admin
Despite all the TRWTF=PHPLOL attitudes the issue here is not the language but this implementation of it. I've been a PHP programmer for many years and I like it. But there's no way in hell I'd use it to write firmware, any more than I'd use a salad fork to cut a watermelon.
I do think PHP is in need of an enema. I was hoping PHP 6 would take the opportunity to spring clean, but sadly not. I'd love to see some redundant functions removed, and some inconsistencies cleaned up. It's clearly been built by 1000 different people, all of whom used different naming conventions, etc. strtotime, nl2br, isset, is_array, empty... what a mess.
Admin
Normally I'm a bit-twiddling C and C++ person, but I just rendered a movie in PHP. Seriously.
I needed to make a video that showed off a large set of images. Imagine a field of constantly changing images, spaced on a grid, and together forming a pattern given by an input bitmap. The video starts centered on one of the images and does a series of movements including a nonlinear pullout zoom, panning with acceleration, and changing the properties of individual images on the fly.
Solution: use the PHP imaging libraries to create the frames, output them as pngs, and use VirtualDubMod to make a video out of the frames. Total code to render an awesome looking 60 second video, 186 lines. I don't know any other language with such simple but powerful image manipulation so easily at hand.
Any decent programmer needs multiple languages. You need a near the hardware language like C or C++ for applications and game programming, as well as for scientific programming. You need a powerful symbolic language like Matlab for prototyping complex algorithms. You need a managed code language with good network support like Java or C# for building client/server systems. You need a scripting language like Python, PHP, or Perl to generate web pages or to script simple tasks that would be too painful to write out in shell. You need a client side scripting language, for which Javascript is the only real contender.
Any of these languages can do the work of any of the others, but a competent programmer will use the right tool for the job. There are precious few languages that aren't well suited for some project or other. So yes, it's funny that someone wrote a driver in a scripting language, but that doesn't make the language a joke.
Admin
These are all turing-complete languages we're discussing here, right? Why are we quibbling about mere things like running times that only differ by a polynomial?
Admin
I like the naming convention for the functions. If I didn't know better, I would think it's part of the PHP standard library.
Admin
PHP is not an appropriate language for a RAID controller. It's not an appropriate language for firmware. You shouldn't write an interpretive language interpreter in PHP.
But what PHP does do, it does quite well. It's a stable, powerful scripting language that minimize development time. It's like a cross between a RAD prototyping language and a production environment - take meaningful business logic and complex website concepts from concept to implementation in a matter of hours, with good enough performance to become a production system!
It's a decent CLI environment, too.
You don't do brain surgery with a 4-lb sledgehammer, you don't write firmware in PHP. But for rapid prototyping of highlevel business logic rules and "weblication" development, it's really hard to beat PHP's awesome combination of power and simplicity. Other languages come close, (perl and python jump to mind) but PHP is just really good at what it does.
No, it's not the "purest" language around - for that, look to Pascal. But for raw "get it done" power, it really is hard to beat PHP.
Admin
bad coder + your favourite language => bad code.
kill bad coders? nah, educate them.
Admin
So true. This is what I say to those who continue to chuck their tasteless diatribes at developers slightly different from themselves....
Let him who is without spaghetti cast the first meatball.
Admin
The problem is that most managers have difficulty distinguishing between bad coders and good coders.
To wit: a reduction in the number of bad coders caused by, for example, their untimely demise, causes the supply curve for coders in general to shift left (bearing in mind that for most managers, a bad coder and a good coder are perfect substitutes)
The reduction in supply of bad coders will result in increased salaries for the remaining good coders, because the equilibrium price for coders is now at a higher point on the demand curve.
You were right the first time. Kill the bad coders.
Admin
The cause of and solution to all of life's problems.
Admin
When you keep hitting your fingers, is it the hammer or the nail to blame? Or maybe the shoe you're using instead?
Admin
Admin
Admin
Admin
Agreed totally...
I always wonder to myself, "Why did Oracle name a function NVL2()?" What a stupid, stupid name for a very common function in one of the most powerful, well-known, and oldest applications on the planet.
But just because it's a stupid name doesn't mean I wouldn't use it, nor does it mean I think all of Oracle sucks.\
PHP is the same. It has some idiotic stuff -- extract(), for example -- but if you use the language primitives and build up a platform (like Cake, Zend Framework, etc.) you can get away from that mess and create a clean foundation.
Admin
Ahem... I think the sort of PHP programmers that produce most WTFs don't even have the slightest idea what a closure is.
Of course, closures are one of those "a little knowledge is a dangerous thing" problems. They are great solutions to certain types of problems, especially for event-driven programming, but are a rich source of Failidity when used gratuitously.
Admin
I believe "firmware" here is being used loosely to mean "embedded software".
I suspect the "RAID controller" here is not a RAID controller card, but a NAS box. (After all, cards don't typically have an LCD; detached server boxes are pretty likely to.)
In that case, the "firmware" is doubtless the whole OS; probably linux + apache (possibly + DAV) + samba.
Which means they probably already have php for their webpage/admin stuff, so why not have one of their PHP guys write the driver for the LCD?
(Turns out the reason is "because he won't do performance testing", but...)
Admin
When all you have is a swamp, every problem looks like it can be solved through desktop search.
Admin
For shell scripting?? You need to be shot.
Admin
Suggested additional areas for PHP use:
Admin
Admin
I'm a "PHP programmer", and that is to say I write Win32 apps in PHP. I know, double-kill: PHP + Win32. But it works.
When I need to do something that stupid, though - I build an extension. PHP wasn't designed to do this, I agree completely. PHP wasn't designed to do a LOT of things, it's just that the language and a lot of its constructs/extensions are written in a way that does not implicitly disallow it (not that I'm complaining, do mind). And it is a helluva lot easier than C...
But then, there's a reason why C exists in the first place, and this program is it. :D
I've also dropped exec() in favor of the more native StartProcess() from w32kernel (had to write my own ext. to do it, though).
Admin
Supra shoes are so popular all over the world. Whatever you take on Supra being in the Supra Skytop Shoes market. Now Supra Strapped Shoes also very popular attention. It is nice that they actually took the time to make Supra Skate Shoes that work well. Supra shoes is a brand that has been inspired, designed and marketed by passionate individuals. We have brought to you the fullest selection of Supra footwear at cheapest price. Overload Skateshop carries a wide range of Supra Shoes to fit your 9-stair kickflips.
Admin
If all eight disk drives had lost power at once, wouldn't the controller probably have lost power too?