Slashdot Mirror


User: dspeyer

dspeyer's activity in the archive.

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

Comments · 287

  1. Lack of Flexibility (Why *I* don't like java) on Why is Java Considered Un-Cool? · · Score: 2, Insightful
    Java has no function pointers. If you want to include callbacks in your data structures, you need to do hideous things with interfaces and virtual functions. You probably need to waste lots of space instatiating them, too, because you can't put a class in a data structure. Granted, you could auto-generate this code (I would if I had to), but using code generation for something which is trivial in a lower level language like C is a very bad sign.

    If this is too abstract for you, consider the following C code for a simple command-line interface:

    struct command_t{

    void (*)callback(char *data);
    char *name;
    char *help;
    };
    struct command_t commands[]={
    {exit, "exit", "exit this program"},
    {help_callback,"help","get help on a given command"},
    {save_callback,"save","save you work to a file"},
    (NULL,NULL,NULL}
    };

    void run_command(char *comm){

    int i;
    char *c;
    c=strchr(comm," ");
    *c=0;
    for(i=0;commands[i].callback;i++){
    if (!strcmp(comm,commands[i].name)){ commands[i].callback(c+1);
    return;
    }
    }
    printf("Unknown command: %s\n",comm); }
    Implementing help is left as an excercise for the reader. So is handling bogus input. The point is that this way I can add a command without touching the command parser -- just write the callback and insert it into the list. If there's some more sophisticate processing needed on some commands, I just add a flag to the structure and do the work once in the parser. Short of code generation, how would I do this in Java? A switch statement is not acceptable, because it means that everwhere I deal with commands, the data will be duplicated (embedded in the code).

    That's just getting started, of course. Then there's the type system, which uses hideous wrapper classes around the most useful types (this can and should be done transparently without involving the user -- lisp, python and ruby do it fine). There's the complete lack of introspection. There's the absolute need to put every helper function into a class whether it logically belongs there or not, bloating classes beyond the problem-space items they represent. There's the misdesigned basic library so complex I need documentation every time I read from a pipe....

    It just takes far too much work to make Java do anything I want.

  2. Re:Drive recovery... on Inside Al-Qaeda's Hard Drive · · Score: 1

    I believe the NSA decomitions hard drives by dissolving the platters in acid. I'm not sure if they use Hydrochloric or Sulphuric. Of course, they don't actually talk about it, so I might be wrong, but I'm sure dissolving the platters will erase the data completely (assuming they do dissolve).

  3. Re:Fake information? on Inside Al-Qaeda's Hard Drive · · Score: 1
    RTFLink

    OP's "they" refered to the CIA.

  4. Genghis Khan on Inside Al-Qaeda's Hard Drive · · Score: 0, Troll
    It's a little hard to look these things up, but AFAIK the mongols were not particularly repressed about sex. I think they killed even more civillians in conquering Iraq than the U.S. did (though the American figure is still climing). That was about 700 years ago. There's probably more recent examples.

    How did Pol Pot feal about sex?

  5. Re:linux == can of worms == MAD on Why Consider Linux Kernel Patent Risks? · · Score: 1

    I'm pretty sure the one year grace period only applies if the puclisher and the patenter are the same person or entity. That's not the issue here.

  6. Re:Yeah, right. on Hackers As Factory Workers? · · Score: 1
    If your coding process involves a lot of repetition then you're doing it wrong. Any time you find yourself writing roughly the same thing twice you should pull it out and make it its own function (or procedure, macro, object, module...). That way you can do it right and check everything because it's just once and you're not thinking about anything else.

    If your language doesn't co-operate, consider code generators -- or switching languages.

  7. Re:Really? From the article... on Unix To Beef Up Longhorn · · Score: 2, Insightful
    That's funny....

    I've heard about NT's POSIX compliance, but I've also heard repeatedly (and, AFAICT, confirmed by their own documentation) that windows has no pipe API. That is one Unix syscall I use a lot. It's the simplest way to connect a command-driven engine to an event-driven GUI.

    What's going on here?

  8. Re:Great! on Software Companies - Merge or Die? · · Score: 1
    At which point all the jobs will leave India, seeking whichever pooroer country is willing to work for even less and has a semi-decent infrastructure. Indians will be furious about the whereverians taking all their jobs, but there will be nothing they can do about it.

    Actually, I think this has already started.

  9. Re:A clear advantage on Mozilla/Firefox Bug Allows Arbitrary Program Execution · · Score: 2, Funny
    As they say...

    Every program has at least one bug and can be shortened by at least one instruction -- from which, by induction, one can deduce that every program can be reduced to one instruction which doesn't work.

    Incidentally, does the lack of proper interationalization in the original code count as a bug?

  10. Re:chown -R root:root .* on What Was Your Worst Computer Accident? · · Score: 5, Informative
    chown -R root:root .*

    Ouch. Now I realize that the right expression for this is not easy to come up with. I think .!(|.) would work if you are using bash with extended globing enabled. But can anybody come up with something better with the same result.

    This is when I do things like find . -iname '.*'|awk '{print "chown root:root " $0}'|less and then check it by hand. If it looks right, replace less with sh and let it run.

    Hope this Helps,

  11. Re:I never understand licenses on Slashback: Civilians, Rubyx, Restrictions · · Score: 1
    There's a slightly more serious version of this which may be legally valid. Certian provision, including extreme disclaimers of warrentee, must be "emphasized" in order to hold legal weight. This is why such paragraphs are often written in ALL CAPS. (IMHO, this only makes them harder to read, but that's besides the point.) The argument which might hold water is that these sections are not adequately emphasized if one must scroll very far to read them.

    The other legal argument I wannt to see is the proof that a user agreed. It is usually possible to re-write an installer so as not to display the license, or simply to make the "I agree" button read "I refuse" (this can be done editing the binary). Some one will have fun with that case.

    Of course, the courts have hardly ruled at all, so click-through licenses way be illigitimate to begin with.

  12. Re: I agree about the computer access on Building a Better Office · · Score: 2, Interesting
    So, basically you've described cases where lock-down works, and cases where it backfires. What we need is a way of distinguishing the two. I propose a simple one: ask your employees. Ask each user whether they would prefer a locked-down system with total hand-holding and support services or an unlocked system with only minimal support for host-specific issues. I strongly suspect most people will choose the right option (mostly the salespeople will choose option A and the coders option B, but the occasional clueful salesperson won't be discriminated against this way).

    All this is based on the assumption that people who don't have a clue what they're doing know that they don't have a clue. In my experience, this is usually the case. There are occasional exceptions. For them, let them get into trouble, and maybe help them out once, but after that tell them "it's your problem, unless you want to go to lock-down." Also be sure to block network access to computers that spew viruses.

  13. Re:I live without Windows on What Keeps You Off of Windows? · · Score: -1, Troll
    So are you saying that anything is all right so long as you do it for money? If I sent a professional assasin after you, would you not object? Having a legitamate goal doesn't make every act performed in seeking that goal legitamate. Maybe if the goal were really, really important (e.g. saving all of humanity from utter destruction), but certainly not if the goal is merely acceptable (e.g. making money).

    Microsoft has worked to "decommodify protocols", damaging the technological infrastructure. They have blocked OEMs from putting out useful products (e.g. dual-boot computers). They have attacked their competitors with slander and barratry. They have carelessly neglected their security, allowing viruses that flood SMTP servers far worse than any spammer. None of this is killing people, but it's not morally right either. And the fact that they did it out of acceptable selfishness is the weakest defense I've ever heard.

  14. Re:USA = China-Lite on How The Government Spies On Your Internet Use · · Score: 2, Insightful
    So let me get this straight. You are saying you would prefer that 24 million people were kept under an oppressive regime because that regime kept Al-queda out?

    Ah, the third excuse for the war. Isn't it suspicious that they offered three completely different reasons when the preceding ones proved unconvincing, but did not alter the plans in the slightest? Makes one suspect an ulterior motive...

    But, ending oppression is worth it -- or would be if it happened. The current U.S. regime is slaughtering civilians about five times faster than Saddam did. The current regime's lip-service to democracy is as hollow as Saddam's. The oppression hasn't ended.

    Furthermore, it's likely to get much, much worse. The U.S. is determined to hold Iraq at whatever cost, but will not place its own soldiers more in harm's way than necessary. That means carpet-bombing rebellious cities.

    Count up the death toll, and then ask what, besides vacous promises, those people dioed for.

  15. Re:USA = China-Lite on How The Government Spies On Your Internet Use · · Score: 5, Insightful
    So when an Al Qaeda "representative" believed to be in Baghdad before the war removes the head of a US citizen and releases the video on the internet in "protest" of the U.S. occupation.... that isn't proof?

    Of course Al-qaeda is active in Iraq now. We've let them in by smashing the police force that kept them out. It's a free for all in seizing the new Iraqi government and of course Al-qaeda wants a piece of it.

    Were there a few Al-qaeda operatives in Iraq before Saddam fell? Maybe. It would be very dangerous for them (death-sentence if captured, even if they haven't comitted a crime yet), but there might have been a few. Not nearly as many as in the U.S. Should we bomb ourselves too?

    The U.S. invasion of Iraq is the best thing Al-qaeda could have hoped for. They get a big new country to play around in. The pressure is taken off them (are we even looking for bin Laden any more?). Most importantly, arabs around the world are seeing that peaceful co-existance with the U.S. is impossible. If anyone is supporting Al-qaeda, it's Bush.

    Now let me clarify that last sentence. I don't think Bush is actually in league with bin Laden. It is possible. The point is that any time you see evidence of someone having Al-qaeda ties, compare it to hat for Bush. If it's weaker, and you don't suspect Bush, then you can't fairly suspect the other person either.

  16. Re:Who is interested in the questions... on HHGTG Screenwriter Interviews Himself · · Score: 4, Interesting
    Prak may not be telling the truth anymore -- after all, the drug has worn off and he may feel free to mess with peoples' heads.

    In the radio series, it is revealed that the question/answer annihilation theory may have been concucted by "a wily editor of the Hitch-Hiker's Guide to the Galaxy to increase the general level of nervousness in the galaxy and, thereby, sales of the book."

  17. Re:Let's just get this out of the way... on More on Global Dimming · · Score: 1
    That only works if the dust is lighter in color than the ground.

    Since coal-burning is one of the major dust sources, the dust is likely to be very dark, meaning that the light that hits it is absorbed and warms the atmosphere. If it were chalk dust, it might help cool us down.

  18. Re:Best. Excerpt. Ever. on MIT Student Grills Valenti on Fair Use · · Score: 1
    I would really like to have seen the interviewer go after him on that.

    It's not just this small group of people -- it's the entire civilization that depends on them. If it weren't for the generations of tinkerers (the sort of people who build their own TVs/radios/steam engiues/forges/etc.) who are seldom more than one percent of the population, everyone else would be sleeping naked in trees hoping to eat the next day. Mr. Valenti would be dead -- hardly anyone lives to 84 without artificial agriculture and medicine.

    Either Mr. Valenti has no idea where technology comes from, or he sees no problem with freezing it where it is now. The scary thing is that a lot of powerful people seem to agree with him.

    P.S. my favorite quote: "I never said anything was immoral ... I said it is wrong" -- what if anything does that mean?

  19. equipment on The Venus Transit 2004 · · Score: 4, Informative
    A telescope alone isn't enough. Looking at the sun through a telescope is almost as safe as gouging out your eyes with a knife. It is possible to get a filter adaquate for sun-viewing, but make sure it's explicitely designed for your size telescope.

    What's proabaly better is a projection scope. A prpoer one is very expensive, but you can just hold any convex lense or piece of shirt cardboard with a really tiny hole in it above a piece of white paper. You'll need very good resolution to see this though, so you should probably calculate that ahead of time.

  20. Re:Awesome on FAA Grants Sub-Orbital License to SpaceShipOne · · Score: 1
    If everyone shared secrets with eachother....

    That's how the internet was built, wasn't it? All the protocols and theory and even source code getting passed freely from person to person. I'd say the internet is one of the greatest engineering achievements of the twentieth century.

    Every field of science has journals in which researchers publish results. Do you think those should be abolished?

    It's not that there was no competition is these examples, it's just that it took a different form. It recognized that even as we struggle for glory or whatever, we're still ultimately on the same side. So we support eachother, and we try to out-achieve eachother, and so long as everyone plays fair, we get the best of both worlds.

    Sorry if this rambles -- I really need sleep.

  21. Re:Awesome on FAA Grants Sub-Orbital License to SpaceShipOne · · Score: 2, Insightful
    Why does everyne think the X-prize will revolutionize space?

    Just because someone's doing something for money they will necessarily do it well. Microsoft does stuff for money. It's not like the X-prize will turn space into a real industry -- real industries aren't dependant on private philanthropy.

    I'm all for throwing more resources into spaceflight, but having many small teams keeping secrets from eachother doesn't sound like a big improvement on having a few large teams that work together. Having many small teams that work together might be better still, but probably not by much. Remember, improvements in spaceflight will be built by engineers -- no one else. If the engineers are serious about what they do (and any who revolutionize spaceflight would have to be) then they'll concentrate on the problem at hand and ignore where their funding comes from, be it government, corporate, private, academic or bank fraud.

    It seems to be an article of faith among many slashdotters that anything the government does it will automatically mess up. It might be worth remembering that all achievements in space flight so far have been government-funded, and that the so-called commercial airlines exist only because of government supsidies.

  22. It could be done on Nasty New Virus Variants · · Score: 1
    Even on windows, it would be possible to set up anti-virus protection that didn't rely on definitions.

    First, create a special user emailchecker who only has write priviledges to the mailboxes. Make sure to back up the mailboxes frequently outside of the priviledge sandbox. This will stop a virus from trashing (or even infecting) your hard drive.

    Then forbid this user to contact the internet without specific permission each time, except on pop. This means you'll have to click OK every time you send mail, but that's not a big deal.

    This is still vulnerable to viruses with root-kits (administrator-kits?) packaged with them, or ones which piggy-back on legitimate e-mail, but both of those are very rare.

  23. Re:Doesn't really strike a chord with me, nope. on The Oft Frustrating Job of a Sysadmin · · Score: 5, Insightful
    Some are, some aren't. If you need to check, carry a gom jabbar.

    Seriously, though, there's an immense difference depending on who you work with. I have two system administration jobs, one with an astrophysics project and one with our campus "student union", which means the people who organize clubs and activities. The astrophysicists I tell the whole truth, and they can apply what I've told them. The buerocrats and student organizers are hopeless: I fix their computers and try to block them technologically from doing stupid things.

    So I guess the message is don't assume all users are the same -- take a minute to categorize them (it doesn't take two).

  24. Re:Microsoft is clearly feeling the Linux heat on Leaked Memo Says Microsoft Raised $86 million for SCO · · Score: 1
    What inroads? Not that much in absolute nmbers, but an immense amount in mindshare, including some high profile switches (e.g. Munich).

    I'd say that two things are worrying MS. First, Linux has experienced continual near-exponential growth, and there's no particular reason for it to stop until it hits up against the finite number of computer users. Second, GNU/Linux now does everything most destops need. I've spoken to a great many people about converting to GNU/Linux, and their greatest concern s Windows compatibility (e.g. what if somebody sends me a word file?). Once GNU/Linux gets big enough that Windows users can't ignore it, they will be responcible for compatibility (it's already starting to happen, in large part because the individuals responcible for the compatibility are nerds). Once that happens, all that will hold people to Windows is familiarity and a handful of legacy applications. That's not much. Windows could collapse fairly suddenly.

    And Microsoft knows it.

  25. Re:Why not buy SCO then? on Leaked Memo Says Microsoft Raised $86 million for SCO · · Score: 4, Insightful
    What would be the point in that?

    Assume that MS is competant (a reasonable assumption, since we're dealing with legal and corporate matters). They want this suit to hurt Linux's reputation. They know it will lose. They know the only way it will make money for them is when worried users purchase Windows licences. They konw SCO will never make back anything, and that SCO may wind up severely in debt after countersuits (Redhat for slander, IBM for patent violation...). Finally, they know that the FUD will be less effective if they are identified with it.

    In short, owning SCO would bring them no money, increase their risk, and decrease their effectiveness. All they would get in return is control. They seem to have that thoroughly enough now.

    Of course, they run the risk that IBM will hostily take over SCO and shut the suit down in an instant. Since this would give more public evidence for "SCO's claims", MS would be perfectly happy.