Slashdot Mirror


User: Vacindak

Vacindak's activity in the archive.

Stories
0
Comments
75
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 75

  1. Re:Not so sure about this - I stil "don't get it" on What is Ruby on Rails? · · Score: 2, Interesting

    The truth is the Rails is well designed all the way through.  I've actually written quite a few things that munge around with the inner workings of Rails (Ruby makes this very easy with all of its metaprogramming constructs), and I've seen first-hand how the components were put together.

    The most important thing to realize is that Rails heavily embraces the concept of "domain-specific languages."  Because of the Ruby's blocks and the ability to dynamicly insert new methods and/or respond to method calls on methods that don't technically exist, it's very easy to effectively create new syntax tailored specifically to the task at hand.

    For example, if you want to have a one-to-many relationship between the people table and the emails table (people often have more than one email address), it would be as simple as this:

    class Person < ActiveRecord::Base
      has_many :emails
    end

    class Email < ActiveRecord::Base
      belongs_to :person
    end

    Or let's say you were writing some schema migration code, and you need to create the corresponding database tables for those two model classes:

    create_table :people do |t|
      t.column :first_name, :string
      t.column :last_name, :string
      t.column :date_of_birth, :datetime
      t.column :biography, :text
    end

    create_table :emails do |t|
      t.column :person_id, :integer
      t.column :address, :string
    end

    That code doesn't care whether you're using PostgreSQL, or MySQL, or Sqlite, or whatever.  And if you need to move into some vendor-specific SQL for some reason, it still doesn't get in your way, because you can just execute whatever raw SQL you need to run.

    Incidentally, the point of schema migration code is to allow you to easily switch between database schema versions while maintaining data integrity.  This is ideal for prefabricated software built using Rails like wikis, blog engines, cms's, etc, since they can change the database schema as required, and upgrading to the new version is as simple for the user as running "rake migrate".

    And that stuff is just the data access layer.  Rails has just as much nifty magic going on in the view and controllers.

    For a high level view of how the components fit together, just stop by the RoR website.  The relevant diagram is prominently featured on the front page.

    http://www.rubyonrails.com/

    (Why doesn't slashdot let me use <pre> block directly?  That's really wierd.)

  2. Re:Watch the demo... on What is Ruby on Rails? · · Score: 1

    It's slow, but it's still going!

  3. Re:It has changed how I buy games on WoW Helping or Hurting the Industry? · · Score: 1

    Yeah, see, that's part of the problem.

    I have so many friends who are addicted to WoW, that I had to buy WoW just to communicate. See, they don't answer their phones anymore. That'd mean they'd have to, you know, get up and walk to answer the phone. So they just let it ring. I gave up and now if I want to see if they want to go watch a movie or hang out or whatever, I have to '/msg WoWAddict Hey, want to go to Tinseltown tonight?' Of course, this is silly of me, because they're always just starting a Molten Core raid.

    WoW isn't killing the games industry. It's killing Real Life.

  4. Since when does open-source = done right? on Sun Spearheads Open DRM · · Score: 1

    Just because they used the word "open-source" doesn't mean it's done right. The mere fact that there will probably be a dependancy on Java indicates to me that it's not "done right."

    And that assumes that any DRM scheme at all can be considered to be "done right."

    This is an example of Sun putting out a standard that they hope the industry will back, ensuring their place in the future of restricted content. At the very least, they're letting it be known that they're happy to play ball with the bad guys. Sun has set their bets, and they're betting that the BSA, RIAA, MPAA, etc are going to be the winners. And they're hoping the open source community will give up and fold. Call the bluff.

  5. Re:Atom's lineage is clear on RSS Version 3 Specs Up for Review · · Score: 1

    Well, it's not a successor to the RDF based RSS 1.0, that much is obvious. It clearly tries to be a successor to RSS 2.0.

  6. Re:Atom RSS on RSS Version 3 Specs Up for Review · · Score: 1

    Doubtful. Creating new versions of RSS has been all the rage for years now. As entertaining as Dave Winer's antics may be though, giving him heart attacks went out of style a long time ago.

  7. Re:rss3? on RSS Version 3 Specs Up for Review · · Score: 1

    Incidentally, the version of RSS you have there is 0.9, a dialect of RDF. It was not created by Dave Winer, and as far as I can know, he has never had any association with the RDF versions of RSS.

  8. Re:Awful, awful idea on RSS Version 3 Specs Up for Review · · Score: 1

    *Shrug*

    I'm writing the FeedTools library for Ruby. I took one look at his spec and came to the same conclusion you did. I shrugged because my parser can already read his spec without any changes to my code at all. I won't actually output anything into this format unless I see a good reason to, but in terms of parsing, it is effectively backwards compatible for parsers that are sufficiently liberal in what they accept. I haven't tried it, but I assume Mark Pilgrim's feedparser for Python would happily consume "RSS 3.0" feeds as well.

    Despite the obvious problems inherant in what Jonathan seems to have done (writing a spec without any real community support or input) his changes aren't really bad ones, in my opinion. It does seem to be an improvement over the current state of RSS 2. I mean, have you ever looked into the cloud element? Aside from Dave Winer himself, has anyone ever actually bothered to implement clouds?

    In any case, you're probably right. Atom is the future.

  9. Re:Microsoft continues to make Windows worse... on Windows Vista & IE7 Beta 1 Released · · Score: 1

    This is true, but at least with Apple, we can repair the problem with Quicksilver. And wow, what a repair it is...

  10. Re:Yes and no. on Microsoft's 10-year-old Certified Professional · · Score: 1

    I taught my little brother C# when he was 11. He's not an incredible super genius or anything, he just had a half-way decent teacher who understood that you don't teach an 11-year-old C# the same way you teach a college student.

    I taught myself BASIC when I was 9, and I was writing games with 3D wireframe graphics (entered the spatial coordinates and line segments all by hand no less) by age 12. Mostly in BASIC (with the aid of a C library for the graphics), since it was several years before I saved up enough money to get something besides the 286 and the TRS-80. How did I pull any of that off? Yeah... I had a good teacher who was willing to take the time to help me out.

    The secret? Keep them interested. You can teach anyone anything if you can get them genuinely interested.

    Of course, now I regret that I didn't teach him Ruby instead.

  11. Re:Troubleshooting process? on NASA Scrubs Launch Due to Faulty Fuel-Tank Sensor · · Score: 2, Interesting

    He who knows himself to be profound endeavors to be clear; he who would like to appear profound to the crowd endeavors to be obscure. Nietzsche

  12. Re:fake DOS... on Pure JavaScript Unix-Like Web Based OS · · Score: 1

    No, they just blatantly ripped me off.

  13. Re:Ding! on Inside Hardware Design - Competing Against the iPod · · Score: 1

    And better yet, there's still nothing stopping the enthusiasts from treating an Apple that Just Works as if it were a hotrod. I dunno, I guess you could call it the Civic of the computing world.

  14. Re:About the autor on Google's Site Ranking Secrets · · Score: 1

    Not likely. The page got pretty high up on the del.icio.us popular list early yesterday, and I assume it traveled to Slashdot from there.

  15. Re:fake DOS... on Pure JavaScript Unix-Like Web Based OS · · Score: 1

    Heh, I think everyone's done this. I know I did, although I had the program grudgingly let a few commands through. You had like a 1/3 chance of the computer doing what you wanted.

  16. Re:Now and then they're actually sneaky. on Britney is #1 Virus Celebrity · · Score: 1

    Yeah, I heard about that. But this particular incident conveniently occured long before that exploit was discovered. Like two to three years prior, IIRC. It was quite awhile ago.

  17. Re:Rails, great for those fed up with J2EE. on Ajax On Rails · · Score: 1

    Wrong. It is definately slower. Always. It is, however, often more efficient. But this is a function of how well written the code is. It's a well-known fact in computer science that no matter how fast your language-choice (or hardware, or whatever) allows your code to run, if your algorithm is inefficient, the more efficient algorithm running on the slower language/hardware will eventually outrun it given a large enough chunk of data. (That's the general point of that big-O notation and the study of algorithm efficiency and all that icky, mathy, theoretical stuff we love to hate.)

    Numerous benchmarks have demonstrated that for simple tasks where the choice in algorithms are the same and the data is the same (ie, a controlled experiment), Ruby gets the crap kicked out of it by Java. Sorting, for instance, is occasionally as much as 45 times slower in Ruby than it is in Java.

    Real-world situations with comparable algorithms are often just as dramatic. I was running an XPath query in Ruby on a very large XML file about a week ago, doing it in Ruby in the hope that I could phase out some Java code in favor of Ruby. The XPath query in Ruby (using REXML) took over an hour to finish (and it was a fairly simple one too). In Java, it took under 5 seconds. There are many reasons for the huge difference, but the main one in this case, is that Ruby sacrificed performance for ease of writing the code (ie, admittedly not so much a language issue, more of a library issue, but still a huge obstacle).

    The situation you were referring to works out the way it does simply because there is an incredible amount of overhead that goes into any of the Java web development systems. Ruby on Rails, in contrast, is comparatively very, very lightweight. But if you hand that same web app a complex processing job, it will inevitably choke and die.

    As much as I hate to admit it (because I truely love coding in Ruby and would love nothing more than to be able to code exclusively in it), Ruby is not ready to be deployed anywhere that performance is a major issue. (Especially if XML is involved. Ruby's XML parsing libraries are still quite a ways away from being the equal of their Java counterparts. And you know management, they have to be buzzword compliant, and XML is a big buzzword and all...)

  18. Re:Get real. on Ajax On Rails · · Score: 1

    Yeah, ditto. At work we have a "solution" using Tomcat that cost us at least $100,000. It's terribly slow and there's nothing we can do about it.

  19. Re:Check the facts again on Mac Install-Base Shown to Be 16% · · Score: 1

    Uh huh. I recently reinstalled Windows XP Pro. It was an SP1 install CD, so I figured, first thing I should do is go update to SP2, etc. By the time I had gotten to the windows update website, I already had something like 15 pieces of spyware/malware/viruses on my machine, and that's not even an exageration. I had the built-in Windows firewall enabled as well. (Don't be silly and suggest ZoneAlarm or the like since I'd still have to download those.) But hey, fortunately, Microsoft makes that nifty new Anti-spyware program. It works great! (No, really it does. But you have to wonder why we couldn't have just been secure from the start.)

    In any case, I went and got a PowerBook instead. The windows machine pretty much just only runs EvE now. It feels really good to be evil-software-free without having to download 800 updates to my operating system. Though really, none of that had anything to do with why I switched. It's just a nice bonus.

  20. Now and then they're actually sneaky. on Britney is #1 Virus Celebrity · · Score: 2, Interesting

    Sneakiest one I ever saw tried to infect my computer by searching through the currently infected computer's sent messages in outlook express looking for ones with attachments. It took the subject line of the original, changed it to "Re: [original subject line]", and set the body of the message to be something along the lines of:

    I hope you didn't open that last attachment I sent you. Turns out it was actually infected with a virus. I've attached a cleanup tool that ought to remove the virus for you. I'm really sorry about that!

    Fortunately for me, the last attachment he had sent was a jpeg. So I let him know he was infected with a rather clever virus...

    But I rather imagine that that virus didn't spread well for all its cleverness. Relying on the contents of someone's sent folder has got to drastically reduce the number of people for the virus to spread to.

  21. Re:Rails, great for those fed up with J2EE. on Ajax On Rails · · Score: 1

    It also needs YARV (which I believe will be the VM for Ruby 2.0) in order to be competitive. As it is, Ruby's speed (or the comparative lack thereof) is one of the biggest obstacles to corporate adoption. That and that it's hard to convince managers that the fact that only one person on their team knows Ruby isn't actually a problem.

  22. No, it really is great. on Ebola Vaccines Successfully Tested on Monkeys · · Score: 1

    Well, you've got the right idea. Undoubtedly, it'll be an expensive vaccine to administer, and you're right, I probably won't do you any good once you've got the disease, especially given how fast it kills you.

    But the vaccine will still be very, very useful. For example: right now, when you have an Ebola outbreak, health care workers are usually so scared out of their minds of the disease that they won't take care of the people who might or might not be infected, which ultimately leads to greater spread of the infection. And beyond that, the health care workers themselves are often a major vector for the transmission of the virus to others. Having the doctors and nurses vaccinated ahead of time in higher risk areas could dramatically reduce the spread of the virus in an outbreak situation. And obviously, giving the vaccine to uninfected villagers will help plenty as well.

    And obviously, in terms of countering a biowarfare attack, this is a huge development. People have been postulating for years that a modified or especially contagious version of Ebola released into a heavily populated area could wipe out huge numbers of people and possibly be far more destructive than even nuclear weapons. Having a vaccine is, in and of itself a deterrant, making the time and effort required on the part of terrorists to build such a biological weapon more of a waste of time, not to mention how useful it would be in case of an actual attack. The attraction to Ebola as a possible weapon has always been based on a) how sickening the disease is, b) how fast it kills and how contageous it is, and c) that there was no vaccine.

  23. Re:Google Should Pay Royalty For Every Access on Publishers Protest Google Library Project · · Score: 1

    here's why i buy those books even though they're free (and often, especially because they're free):

    i use those technical books as a reference. i search them in two very different ways; were they to make them paper-only, i would lose one of those methods of searching.

    1) searching by flipping through pages. no matter how advanced ebooks get, flipping through paper pages looking for a particular concept will always be easier.

    2) the almighty google. no matter how nice physical paper is, google will always find that keyword faster, and google's site: modifier does a fantastic job of enabling this.

    oh yeah, and besides that, the technical books one sticks in their cube's bookshelf is often sort of like a geek version of a pissing contest. "i have cooler tech books than you!" "why don't you have the GOF book on your shelf? i thought all decent programmers had it." etc.

  24. Re:Dodgeball Looks Pretty Cool on Google Acquires Dodgeball · · Score: 1

    It was a 20% project.

  25. Re:centralized social networks will never work on Google Acquires Dodgeball · · Score: 1

    Foaf has a lot of problems of its own. I'm inclined to believe that Foaf won't matter until there's Google-quality search just for Foaf, as well as a better way of displaying it than the Foaf Explorer (preferably integrated into the search page itself). But, hey... what do you know, that's centralization. :-P