Slashdot Mirror


User: jadavis

jadavis's activity in the archive.

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

Comments · 1,994

  1. Re:Perl. on Choice of Language for Large-Scale Web Apps? · · Score: 2, Insightful

    We're talking about web applications here. I'm a great fan of C, particularly for manipulation of binary data and so forth, but your post makes no sense.

    You would have to be doing something quite unique as far as web applications go for perl to be different speed-wise than C. Web applications are basically text processing and database queries (usually). Perl has highly integrated, optimized text processing routines that even a good C programmer is unlikely to match without years of development. And database queries aren't going to be any different at all... they just depend on the database.

    Next, why do you say that perl is fast with arrays and slow with files? If you mean appending something to the end of a list in RAM (maybe a microsecond) is faster than waiting for a disk seek time (millseconds), well, duh. That is not language-dependent at all.

    If that's not what you meant, it makes no sense either. Perl is designed and optimized for processing text and files. Perl's arrays are designed for flexibility, not speed.

    And why did you ask what the application was? It's a large scale web application. You can infer a lot from that. Lots of text processing, use of many libraries, validating user input, database queries, and caching. Maybe some image processing. Lots of security concerns.

    The obvious choices here are Java (many highly developed web frameworks, many libraries, many security features) and then PHP, Perl, Python, Ruby (which might add rapid application development to that list). C/C++ would be special purpose. Anything else is a platform-dependent solution that's an "all or nothing" approach.

    I think most people would agree with the above statement, and the discussion should be mostly within that context. Not whether or not you can use C to marginally improve performance doing something that a web app doesn't need to do.

  2. Re:What about security? on Choice of Language for Large-Scale Web Apps? · · Score: 3, Interesting

    Perl, Python, and Ruby are handy because they have an interface to C. You never find yourself without a module if you can just make a wrapper for C.

    Although I haven't tried it, you can get similar benefit from using Jython. Having two languages like Python and Java at your disposal has got to be a godsend for a large web app. I'm not sure if you still get to use C modules if using Jython.

  3. Re:You might hate Apache but.... on Why I Hate the Apache Web Server · · Score: 1

    Interesting. I will definitely take a closer look at that. Correct me if I'm wrong, but spawn-fcgi still needs to start a new process when a request comes in right? And spawn-fcgi is only for lighttpd, right? Lighttpd looks like an interesting webserver.

  4. Re:You might hate Apache but.... on Why I Hate the Apache Web Server · · Score: 1

    fastcgi does not allow suexec as far as I know.

  5. Re:You might hate Apache but.... on Why I Hate the Apache Web Server · · Score: 1

    CGI scripts are slow. It would be very nice if apache could run code as different users depending on which website was accessed without using CGI.

    The mod_proxy solution suggested above is interesting. I am looking into that right now. It seems a little silly to have the proxy server be a heavyweight thing like apache, but it probably doesn't make too much difference with some good configuration. The main problem is the RAM consumed by many independent webservers, but I guess that can't be avoided.

  6. Re:You might hate Apache but.... on Why I Hate the Apache Web Server · · Score: 1

    I was more concerned about one user being able to affect another. PHP has safe mode to protect one user's home directory from another, but there isn't really a solution for perl, ruby, or python. If one user has a python script that sends a password to connect to a database, another user could write a specially crafted python script to read it.

    I want isolation. Of course you can separate content handlers based on pretty much any criteria. I want to separate permissions.

  7. Re:HTTP are often more practical than FTP on Why I Hate the Apache Web Server · · Score: 1

    Real men use netcat (nc) to transfer files.

    Protocols are a sign of weakness.

  8. Re:You might hate Apache but.... on Why I Hate the Apache Web Server · · Score: 4, Insightful

    My main complaint about Apache is that it makes it difficult to divide up users' dynamic content.

    If one user wants mod_perl, one wants php, and one wants mod_ruby, you pretty much have to have different webservers running, which means an administrative hassle and separate IPs.

    There are a couple solutions I can think of:
    (1) Change unix user permissions after it's selected a vhost, but before running any code or accessing files. Not just for CGIs, either, but modules.
    (2) Make it easier to run seperate webservers as if they are one. Basically take the administrative hassle out of running multiple webservers.

    Right now ISPs basically just offer PHP and use safe mode. But that doesn't help other languages, and it's basically a php hack.

    It would also be nice if problems with one vhost didn't prevent the entire server from reloading the config. It should give a nasty error maybe, but the webserver shouldn't shut down the working vhosts, at worst it should leave it as it was before the reload.

  9. Re:Serious? Oh, it's very serious. on HP Fires Father of OOP · · Score: 1

    Non-profit corporations are great.

    What's so wonderful about a non-profit corporation? That's just a word. They still have revenue, expenses, and salaries. Non-profit corporations are often controlled by very highly paid people, and are plagued by at least as much corruption as for-profit corporations.

    And corporate profit, to a degree, is a myth. Companies and corporations make profit when an industry is growing, they break even when the industry is level, and they lose money when the industry is falling.

    I disagree with your reasoning, but I don't like corporations either. After all, what is a corporation? It's basically the following deal between government and a business:

    "We'll double-tax your money, but in return our courts won't hold you liable for any damage you cause."

    That's pretty much the deal. No individual liability (and therefore no personal responsibility), and in return the government gets more taxes. Sounds more like a bribe at first glance. Nobody ever seems to look at it that way for some reason though.

  10. Re:I agree on What is Mainframe Culture? · · Score: 2, Insightful

    using the C language.

    Why is there so much animosity toward C on /. (OK, so maybe it has something to do with the buffer overflow track record, but still...)?

    It may not even be his first language. Maybe he's already learned some python and wants to gain better understanding.

    C language concepts are not isolated to the C language. If you're programming in Java, you may not have to allocate memory directly, but you have to manage the resouces you do have.

    If you're programming a web application that caches frequently-accessed pages, you need to manage your cache memory as a resource. That's a hard problem and if you're not careful there are all kinds of pitfalls that can leave you with inconsistent cache, starving clients, or a useless waste of memory and CPU time. No magical langauge or library knows enough about your application's caching needs to be any help. And you're going to be in real trouble if you've never run into an easier resource problem, like doing malloc/free for dynamic data structures.

    Trying to prevent the buffer overflows by discouraging the study of resource management is OK for anyone at the "code monkey" level or below. Code monkeys solve problems that have already been solved many times before, and frequently have no need to manage resources. However, anyone who wants to be able to solve new and difficult problems (like the poster to whom you responded) should certainly be aware of resource management concepts.

    That being said, you should use the right tool for the job. If you are actually planning on connecting your software to the internet, it's nothing short of irresponsible to allow rampant security problems, particularly if another tool makes it so easy to be secure.

  11. Re:I agree on What is Mainframe Culture? · · Score: 1

    Interesting. I always thought Java was the primary cause of irreperable brain damage to new programmers. Not because it's bad; I don't think it is. I just think it's a bad way to learn.

    A new programmer is confronted with classes, inheritance, and exceptions right away. It's hard to understand because when you're writing "My First Hash Table", the professor has a hard enough time explaining why a hash table is useful. Then when someone wonders "why are we using this class thing" the professor can't say anything other than "because I said so". That can lead to a weaker understanding of OOP where students are thinking imperitively and programming with objects.

  12. Re:So much for stopping nuclear proliferation. on 60th Anniversary of the Atomic Bomb · · Score: 1

    I just watched "Dr. Strangelove". It looks like you did, too.

    At the beginning of the movie it tells you how the events in the movie are not possible because of all the safeguards.

    One person can't launch a U.S. nuke, except maybe the president, and even he would probably need to convince some submarine captain or something.

    I don't see any reason at all that we should try to destroy our nuclear arsenal.

  13. Re:Yuk on U.N. To Govern Internet? · · Score: 1

    But the concern is that giving the control of the internet over to some arbitrary global powers could result in censorship.

    Right now it's pretty cheap and very permissive what you put on the internet. I don't trust the U.N., Germany, France, Iraq, China, Canada, or anyone else to keep it that way.

  14. Re:Modularised code will always have this problem. on Zlib Security Flaw Could Cause Widespread Trouble · · Score: 1

    we can afford to spend some CPU cycles on reliability and security.

    How often do we have to pay those cycles? How many cycles can we afford? How many cycles does it cost to solve the buffer-overflow problem?

    Without answering these questions with real numbers, your statement is a meaningless generality.

    Some things to consider:
    (1) zlib is a library used by many, many applications without explicitly being invoked. If you're running a webserver, it may matter a lot to you if each zlib call takes 1/10th of a second.
    (2) although average speed of many languages is close to C, you have to consider the details. Some types of in-memory manipulations (the kind that zlib may be doing) might be significantly faster in C.

  15. Re:C'mon, let's have some critical thinking here. on Fuel-cell Vehicles for Americans · · Score: 1

    Very interesting. I was under the apparently false impression that hydrogen was a more practical form of storage than batteries. As long as the car is electric, that's the goal for me.

    Can you point me to some links?

  16. Re:Renewable hydrogen is prohibitively expensive on Fuel-cell Vehicles for Americans · · Score: 1

    It's not easy to handle, like alcohol or electricity.

    Electricity is easy to handle? Batteries are way too heavy and expensive. I don't quite know what you mean by that.

    By the way, what's the solution you're offering? Hydrogen can be produced by nuclear power, avoiding fossil fuels altogether. It seems like hydrogen is the best way we have right now to store energy in a car in a clean way.

  17. Re:Maybe 4 bombs on Six Bomb Blasts Around Central London · · Score: 1

    WWII was solved by violence, not "round table discussions". Any discussions were held only after the unconditional surrender of the enemy, at which point the enemies had no negotiating power. The discussions were more between the allies, who basically divided up the land afterward.

    It's unfortunate, but sometimes the only way to solve a problem is by violence.

  18. Re:Which way? on Justice O'Connor Retiring · · Score: 1

    Of course it's an inherent failing in government: someone has to have power somewhere.

    But the people have the ability to interpret the Constitution, too. If the SC says that the Constitution says the exact opposite of what the words mean, people may get pretty mad about the situation.

    For instance, the SC has declared that a person growing marijuana plants on his own property and consuming them himself is engaging in "interstate commerce". Huh? I don't want those people to have the final say if that is the kind of ruling that they pull out of their ass. I can't figure out why more people aren't upset.

    I suppose it's because they agree or disagree with the policy that the SC has made, rather than question why the SC is the one making policy. I disagree with any ruling that creates policy that is not apparent from the text itself, regardless of my feelings about the policy.

    When a court misreads an Act of Congress, it's not so bad. Perhaps one case is harmed, and Congress can clarify the law. When the SC misreads the Constitution, how might that be corrected? You must wait for a new judicial landscape that is willing to overturn precedent in favor of the original text of the Constitution and it's Amendments. That could take decades, if it ever happens.

    The Rule of Law is vital to a healthy society. People must be able to know in advance whether they are breaking the law or not. Uncertainty leads to frivilous lawsuits and persecution of the innocent ("We'll find a law you're breaking", or "We'll hire more expensive lawyers than you can afford", or "The risk you'll lose outweighs the settlement you can give me right now", or "It will cost you too much to defend yourselves").

    Everyone is vulnerable. Corporations and companies are vulnerable to the uncertainty because a frivilous lawsuit may blindside them. A private individual might not have the resources to defend a lawsuit by a corporation.

    Uncertainty in the courts is Rule by Man, which is bad. The most important thing for any society is the Rule of Law. I will support any cause, left, right, or center that supports the rule of law before I support any policy that diminishes the Rule of Law.

  19. Re:Common sense on Sunscreen Not So Good for You? · · Score: 1

    A long time ago, nobody had sunscreen and spent a lot of time in the sun. Also a long time ago, people didn't take showers very often. It makes me wonder, what's the SPF of the grime that builds up on the average outdoor human after a few months?

    This is a serious question. I'd like to know because it doesn't make sense to me that everyone back then would get skin cancer, but everyone obviously spent a lot of time in the sun.

    Also, are black or dark people also vulnerable to the sun, or is it mostly just white people?

  20. Re:Mandatory overtime on In SIlicon Valley: Profits up. Employment Down. · · Score: 1

    I think part of it is that employees often demand so much, and that employers can't expect enough out of them.

    Employees damand that the employer enroll them in an expensive, screwed up health system, and all kinds of other benefits.

    Who would want to hire a worker when it takes such a huge amount of money to hire and train the worker, and they might not work out for some variety of reasons, and then you can't get rid of them because they'll sue you for "wrongful termination". It is unprofitable to hire someone if they take maternity leave after the employer spent a year trying to train them.

    Machines/automation is easier. No complaints, no benefits, no lawsuits. When workers offer that kind of productivity (real productivity, not "I did the minimum work that it takes to be harder to fire me then to keep me", or "I have a right to this job"), they will be hired, until that time, they will be "private contractors".

    Workers who seek to provide value to a company will get great compensation. Workers to are concerned with filling some specific job requirements and nothing more, or who get involved in company politics, or who care more about their severance package than their output, will continually get the shaft, particularly in a bad economy.

  21. Re:Which way? on Justice O'Connor Retiring · · Score: 1

    That doesn't always fit with reality. Reality may be that the government needs to build a dam or a road, and your property is in the way. In those extreme circumstances (which are very rare), they can force you to sell it for "just compensation" which means you can get screwed, but it's a necessary evil.

    The problem is when government doesn't really need your land to do something for public use, it just realizes that it can get much more tax revenue from someone else. So they confiscate your land, sell it to someone else, and claim that the tax increase is a "public purpose". Of course it's not "public use" so that practice is unconstitutional. But the U.S. Supreme Court says it's Constitutional, for whatever stupid reason, and nobody will stand up and tell them "no". The plain english of the Constitution is clear, and the Supreme Court is telling you otherwise using legal BS. It's time for someone to tell them "no, the Supreme Court does not have the final say, the Constitution is the final say".

  22. Re:Public ConServants on Justice O'Connor Retiring · · Score: 2, Interesting

    I disagree. O'Connor is a moderate politically, but an activist judge. She sometimes comes down on the side of the right, and sometimes the left, but almost always making law that didn't exist before.

    Example 1: The death penalty for minors. Where in the Constitution does it say that the death penalty can't be used on minors? It's a perfect example of something that should be left up to the states. As justification, the majority in that decision used international laws (wtf?) and some kind of "evolving standards". That is not rule of law, that is rule of man (or woman, in this case).

    Example 2: Roe v. Wade. Let me say that I believe that abortion should be legal in some circumstances. However, I am against the decision for two reasons: first, it should be up to the states, and second, if it is national law, why not let the legislature make the law? The Constitution does not state anywhere that abortion is illegal. 5 judges of 9 decided that for the whole nation. If it should be a right, try to get an Amendment passed. Otherwise, it's up to the states (or at least the legislature).

    We live in a nation where the rule of law should apply. You should know in advance whether you're breaking the law or not, in plain english. Even 4 Supreme Court justices don't know that you're breaking the law? That's the abysmal state of our legal system right now. In reality, they fabricate the law where it doesn't exist, and interpret the Constitution to mean exactly the opposite of what it says because of a chain of precendents each using odd reasoning and ignoring the implications.

    You can give me a million good reasons why it's a good idea to require registration and waiting periods for guns, and to impose all kinds of restrictions on the sale, transportation, manufacture, and so forth. But it's all unconstitutional, plain as day. The 2nd Amendment does't say "the right of the militia" it says "the right of the people". It's unqualified permission for any person in the United States to keep and bear arms. Of course responsibility comes with that, and if you are threatening people, you go to jail, where you lose all kinds of rights. But the Supreme Court is too smart and clever to read the simple sentence, they use all kinds of strange logical constructs and legal BS to ignore the text.

    Now we have stupid rulings where it's legal to have the 10 Commandments in Texas but not in Kentucky. One place it's Constitutional and the other place not? I hear all kinds of political BS every day, and all of it is "protected speech" (even if paid for by the taxpayers), but if someone gives it the magical label "religious" it is now "unconstitutional speech". What deserves the label "religious" vs. something else? Judges, primarily.

    In other words, we live in a land ruled by man, not law.

  23. Re:bah! on How to Do Everything with PHP and MySQL · · Score: 1

    This post is incorrect, or at least entirely misleading.

    it doesn't come with commercial support

    There are numerous companies that will help you, depending on what country you live in. Try Command Prompt, Inc in the U.S. (among others).

    download half a million tarballs

    Do you download the kernel source, the source for gnome, kde, gcc, glibc, bash, OO.o? Then why do you need to download the source for PostgreSQL?

    I usually do "apt-get install postgresql" for production.

    On a development box when testing out a new version I'll download the PostgreSQL source, and that involves one download, and a compile time of a couple minutes on my box.

    Really, what more can you ask for from PostgreSQL? Serious question. If compiling source is too hard, download a binary like you do for 90% of everything else.

  24. Re:What was interesting on Supreme Court Rules against Grokster · · Score: 1

    You're probably right, but 200 million guns sounds like a lot to me. Even simple organization, like everyone with a gun meeting up somewhere, would be overwhelming I would think. Let's just hope it doesn't happen, I think we can agree that either way would be pretty bad for both sides.

  25. Re:What was interesting on Supreme Court Rules against Grokster · · Score: 1

    and if not part of a well-regulated militia, they can't bear arms,

    You don't have to be part of any militia to have the right to keep and bear arms. You just need to be one of "the people", which women are.