class Foo
%w(one two).each do |method_name|
define_method(method_name) { method_name }
end end
PHP:
<?php class Foo { // Respond to method one and two, returning the method name
function __call($method, $args)
{
if (in_array($method, array('one', 'two')) {
return $method;
} else { // The documentation is not clear how to notify // the caller that the method does not exist
}
} } ?>
It's a silly example, but it highlights a shortcoming of PHP that does make for more work when the concept is extended into the real world. Furthermore, the Ruby code is fairly self-documenting. The PHP, not so much.
The fact remains, for a scripting language, PHP requires you to do far too much work. More work leads to less maintainable code. At least in the case of C, the extra work is justified.
You are misinterpreting what he is saying. A Rails application could easily have 400 instances. They were restarting them once or twice a day. I'm not sure where it is off hand, but there is a DHH quote that confirms what I am saying.
Who said anything about deficiencies? If I want a method to work like this, and Rails works like this, I can just overwrite the method. That doesn't mean the Rails way is wrong, just different. It is a system that works very well in the real world.
No framework is going to always work 100% exactly how you want it to, but at least Rails makes it easy to change it to your exact specifications.
Look a little closer. He says they were restarting the application maybe once a day. Still not ideal, but nowhere near 400 times. Unfortunately, his choice of words to anyone who hasn't deployed a Rails application will make it look like it really was 400 times a day.
And rails in particular from what I've heard is especially frustrating when its 'oh-so-close-but-not-quite' what you need.
Frustrating because you have to code what you what instead of letting the magic do it for you? Rails is incredibly easy to modify and extend to do exactly what you want it to be thanks to the monkey-patching abilities of Ruby. But you can't expect the magic to work in every situation.
From all the statistics I can gather, Yellowpages has quite a bit more traffic than Twitter and it seems to be performing just fine. Without seeing the code, their experience is mostly meaningless. I can write a program in assembly that will perform worse than the same program written in Ruby if I wanted to. Does that mean assembly won't scale?
You're right. Ruby is ugly if you try to write Ruby like you'd write PHP, or Python, or whatever language you think is beautiful. And although Ruby lets you code in that style, to really realize what Ruby has to offer you have to understand that Ruby is quite different than most other languages and use that to your advantage.
``Every program attempts to expand until it can read mail. Those programs which cannot so expand are replaced by ones which can."
Once the App Store is open for business I'm sure the marketing of the iPod Touch and iPhone will shift from MP3 player and cell phone to them being complete mobile computing platforms that also just happen to play MP3s and make phone calls.
Perhaps we'll even see some new hardware/software at the same time that makes mobile computing with these devices even more appealing, creating a whole new market.
The argument against child pornography is that the desire to obtain it creates a demand industry, which means that children will be hurt. That is a danger to society.
But the digital media itself cannot hurt anyone by the simple nature of what digital media is. It is nothing more than a sign that this person might endanger children.
Looking at it from that angle: What if you had a piece of paper with a marijuana leaf drawn on it in your brief case. You were not in possession of marijuana nor did they have any evidence that you have ever touched the stuff. But it's a sign that you like to use drugs or perhaps that you are even a dealer. Is that a good enough reason to keep you out of the country on the grounds of that drawing alone?
Doesn't it seem strange that we ACTUALLY care about these animals?
The entertainment industry has made animals appear human-like which gives people reason to care for them. Since the majority of the population will never set food on a farm and see what things are really like, they assume the portrayal of animals in the media is reality.
A statistic I would be interested in seeing is how many people who grew up on a farm that raised animals have become vegetarian/vegan later in life.
In the real world the assumption is that you do not touch someone else's property without permission. However, on the internet the reverse is true. It's assumed that you have permission unless the information uses some type of access control protection.
Should I be required to get consent from VA Linux before I try to access Slashdot? Of course not. So why should I be required to do it when it's my neighbour?
Disney was well known for using Linux for those things you mentioned several years ago. Granted, some of the software they used was probably developed in-house. I don't know if they are still using the platform, but if it was good enough then, it can't really be worse today.
Sure. PHP is simpler, but it's not like it's hard. The fact remains, for a scripting language, PHP requires you to do far too much work. More work leads to less maintainable code. At least in the case of C, the extra work is justified.
That's the problem with PHP. It requires all the hard work of writing C-like code, without any of the benefits that one might chose C for.
You are misinterpreting what he is saying. A Rails application could easily have 400 instances. They were restarting them once or twice a day. I'm not sure where it is off hand, but there is a DHH quote that confirms what I am saying.
Who said anything about deficiencies? If I want a method to work like this, and Rails works like this, I can just overwrite the method. That doesn't mean the Rails way is wrong, just different. It is a system that works very well in the real world.
No framework is going to always work 100% exactly how you want it to, but at least Rails makes it easy to change it to your exact specifications.
Look a little closer. He says they were restarting the application maybe once a day. Still not ideal, but nowhere near 400 times. Unfortunately, his choice of words to anyone who hasn't deployed a Rails application will make it look like it really was 400 times a day.
Frustrating because you have to code what you what instead of letting the magic do it for you? Rails is incredibly easy to modify and extend to do exactly what you want it to be thanks to the monkey-patching abilities of Ruby. But you can't expect the magic to work in every situation.
And Penny Arcade is a Rails site!
From all the statistics I can gather, Yellowpages has quite a bit more traffic than Twitter and it seems to be performing just fine. Without seeing the code, their experience is mostly meaningless. I can write a program in assembly that will perform worse than the same program written in Ruby if I wanted to. Does that mean assembly won't scale?
You're right. Ruby is ugly if you try to write Ruby like you'd write PHP, or Python, or whatever language you think is beautiful. And although Ruby lets you code in that style, to really realize what Ruby has to offer you have to understand that Ruby is quite different than most other languages and use that to your advantage.
Ergo, all programmers who read Slashdot have beards?
As long as you follow the HTML standard, all web pages should already be "lite". One just needs to ignore images and CSS when bandwidth is lacking.
I've got a grain bin full of corn in my backyard. It would be pretty sweet to be able to just auger that into this machine and make fuel as needed.
But for considering the price of corn and $10,000, it doesn't sound very cost effective on the scale I would be using it.
If they have served their time, why are we preventing them from integrating back into society?
Once the App Store is open for business I'm sure the marketing of the iPod Touch and iPhone will shift from MP3 player and cell phone to them being complete mobile computing platforms that also just happen to play MP3s and make phone calls.
Perhaps we'll even see some new hardware/software at the same time that makes mobile computing with these devices even more appealing, creating a whole new market.
The argument against child pornography is that the desire to obtain it creates a demand industry, which means that children will be hurt. That is a danger to society.
But the digital media itself cannot hurt anyone by the simple nature of what digital media is. It is nothing more than a sign that this person might endanger children.
Looking at it from that angle: What if you had a piece of paper with a marijuana leaf drawn on it in your brief case. You were not in possession of marijuana nor did they have any evidence that you have ever touched the stuff. But it's a sign that you like to use drugs or perhaps that you are even a dealer. Is that a good enough reason to keep you out of the country on the grounds of that drawing alone?
Someone who designs Microsoft Windows by day and writes open source software by night could be considered a open source hacker.
So, by that analogy, you can be vegan as long as one of your meals in a day is a vegan meal.
Or is it: People Eating Tasty Activists?
Why not do it?
The entertainment industry has made animals appear human-like which gives people reason to care for them. Since the majority of the population will never set food on a farm and see what things are really like, they assume the portrayal of animals in the media is reality.
A statistic I would be interested in seeing is how many people who grew up on a farm that raised animals have become vegetarian/vegan later in life.
If I attached an awning to my home that happened to extend out over your property, I'd be more than happy to let you sit under it.
In the real world the assumption is that you do not touch someone else's property without permission. However, on the internet the reverse is true. It's assumed that you have permission unless the information uses some type of access control protection.
Should I be required to get consent from VA Linux before I try to access Slashdot? Of course not. So why should I be required to do it when it's my neighbour?
It was definitely on the desktop. It was the reason why they did all that work on Wine to get Photoshop working.
Disney was well known for using Linux for those things you mentioned several years ago. Granted, some of the software they used was probably developed in-house. I don't know if they are still using the platform, but if it was good enough then, it can't really be worse today.
Why pay big bills when you can just hijack someone else's computer to do the work for you?