Slashdot Mirror


User: mini+me

mini+me's activity in the archive.

Stories
0
Comments
1,828
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 1,828

  1. Re:Is this really news? on Changes In Store For PHP V6 · · Score: 1
    Ruby:

    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.
  2. Re:Is this really news? on Changes In Store For PHP V6 · · Score: 1

    Ever try to do lots of string concatenation in C?

    Sure. PHP is simpler, but it's not like it's hard.

    GString *s = g_string_new("Hello");
    g_string_append(s, ",");
    g_string_append(s, " ");
    g_string_append(s, "World!");
    g_string_free(s);
    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.
  3. Re:Is this really news? on Changes In Store For PHP V6 · · Score: 3, Insightful

    What makes PHP nice is that, language-wise, it is basically C plus a subset of C++ wrapped up in a scripting language.

    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.
  4. Re:Ruby Can't Scale on Twitter Reportedly May Abandon Ruby On Rails · · Score: 1

    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.

  5. Re:Does a clean architecture matter? on Twitter Reportedly May Abandon Ruby On Rails · · Score: 1

    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.

  6. Re:Ruby Can't Scale on Twitter Reportedly May Abandon Ruby On Rails · · Score: 1

    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.

  7. Re:Does a clean architecture matter? on Twitter Reportedly May Abandon Ruby On Rails · · Score: 1

    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.
  8. Re:According to Penny-Arcade: on Twitter Reportedly May Abandon Ruby On Rails · · Score: 2, Informative

    And Penny Arcade is a Rails site!

  9. Re:Ruby Can't Scale on Twitter Reportedly May Abandon Ruby On Rails · · Score: 1

    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?

  10. Re:View of a tech dinosaur on Twitter Reportedly May Abandon Ruby On Rails · · Score: 1

    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.

  11. Re:Me = Beard, Boss = No Beard on Facial Hair and Computer Languages · · Score: 1

    Ergo, all programmers who read Slashdot have beards?

  12. Re:Times change on Average Web Page Size Triples Since 2003 · · Score: 1

    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.

  13. Re:Cellulosic version? on Consumer Ethanol Appliance Promised By Year's End · · Score: 1

    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.

  14. Re:Why aren't these "known criminals" in jail? on Companies To Be Liable For Deals With Online Criminals · · Score: 4, Insightful

    If they have served their time, why are we preventing them from integrating back into society?

  15. Re:I'm sure they predicted it on Apple Prepares For the Coming iPod Slump · · Score: 1

    ``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.
  16. Re:Border warrantless searches on Laptops Can Be Searched At the Border · · Score: 2, Interesting

    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?

  17. Re:Vegans != Hive mind. on PETA Offers X-Prize for Artificial Meat · · Score: 1

    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.

  18. Re:hmm on PETA Offers X-Prize for Artificial Meat · · Score: 1

    Or is it: People Eating Tasty Activists?

  19. Re:They are unpleasant already on PETA Offers X-Prize for Artificial Meat · · Score: 1

    And then there are that simple fact that we don't need to eat them, so why do it?

    Why not do it?
  20. Re:They are unpleasant already on PETA Offers X-Prize for Artificial Meat · · Score: 1

    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.
  21. Re:news.. on Some 12% of Consumers 'Borrow' Unsecured Wi-Fi · · Score: 1

    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.

  22. Re:news.. on Some 12% of Consumers 'Borrow' Unsecured Wi-Fi · · Score: 3, Insightful

    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?

  23. Re:The problem is software. on Red Hat Avoids Desktop Linux, Says Too Tough · · Score: 1

    It was definitely on the desktop. It was the reason why they did all that work on Wine to get Photoshop working.

  24. Re:The problem is software. on Red Hat Avoids Desktop Linux, Says Too Tough · · Score: 1

    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.

  25. Re:Of Course on Senator Proposes to Monitor All P2P Traffic for Illegal Files · · Score: 1

    Since these greasy rogues produce over 90% of the e-mail, then one can take from that that they're also paying big bills to do this...

    Why pay big bills when you can just hijack someone else's computer to do the work for you?