Slashdot Mirror


User: Andrew+Wiles

Andrew+Wiles's activity in the archive.

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

Comments · 15

  1. Group source by build target on Arranging Multi-Language Source Code Trees? · · Score: 1

    You should group source code by build target.

    E.g. For the Java/C application, the C code generally builds to a dynamic library (a DLL or .so), while the Java code probably builds to a .jar file or such. These are nicely independent build targets, so they should be in separate directories.

    Hopefully your project is well architected at a high level, and each of the build targets is semi-autonomous. Every directory should contain a chunk of code that can be tested semi-independently. If your project doesn't work this way, you need to refactor.

  2. Java rules for I18N on Software Internationalization · · Score: 1

    Java has outstanding support for writing internationalized applications. It's not so much the language itself as the standard libraries.

    I've done some work in this area. Here's what Java supplies:

    • Unicode support. It's everywhere. Right down to the String constructor. The standard I/O classes have built-in Unicode support too, and they make a clear distinction between "reading bytes from a file" and "reading characters". I don't know any other language whose standard library is so hardcore about this.
    • Locale-specific formatting of dates and numbers. (That's right - "multi-lingual" is only part of the problem.)
    • Functions for handling time zones, because you'll need to handle time zone differences.
    • Support for looking up localized strings. In Java you use ResourceBundles.

    "Library design is language design." Believe it. All languages have strengths and weaknesses. I18N support is a major strength for Java.

    Java.sun.com has an I18N tutorial.

  3. Re:Can't a judge strike down a bad law? on Felten vs. RIAA Hearing · · Score: 1
    The SC doesn't want to decide hypothetical cases for two very good reasons. One is that most of the time the peculiar circumstances of a real case matter more than the abstract principles,

    Thanks. Maybe I'm getting offtopic, but this is something geeks tend to misunderstand about law.

    In programming, everything is based on the abstract principles of the system being programmed. Programmers tend to think the legal system should work the same way. As a result you see a lot of rather simplistic (but logically sound) reasoning whenever /.-ers argue about matters of law.

    It just goes to show, geeks shouldn't run everything. ;)

  4. Re:What would be nice... on California Takes Issue With Microsoft Settlement Idea · · Score: 1
    I wish Microsoft would respond to their offer. I suspect the response would either be that RedHat has nothing to do with the case and should butt out, or that the computers would be useless without Windows installed. BS either way.

    Not necessarily. How many educational software packages for Linux can you name?

  5. Re:TWO of the more intractible problems? on Intel Cites Breakthrough In Transistor Design · · Score: 1
    In short, why the hell SHOULD Intel, AMD, et al, make the best chips the can?

    Um, because they're in competition with one another?

    It amazes me that the conspiracy theory of capitalism consistently gets (Score:3, Insightful) around here.

    What possible motive could they have for killing off a great revenue source at little effort, when the alternative would be a one-off mediocre improvement in sales for gigantic effort, followed by a massive slump?

    If Intel tomorrow came out with a Pentium-compatible terahertz chip that could run on a tenth of the power a Pentium needs, without a heatsink, all for a reasonable price, Intel would instantly dominate the market. The thought that they wouldn't jump at the chance of cutting the heart out of every other chipmaker is absurd.

    ALL of these refinements could be implemented tomorrow

    Boy are you wrong.

    Taking innovations from the lab into production is expensive and risky. "Expensive" is something Intel can afford, but "risky" isn't - not on their major product line.

    Add enough innovations -- enough risk -- to a project at one time, and it'll fail. Or go 36 months over schedule. Or (nightmare of nightmares) ship 10 million units of a faulty product.

    Besides all that, there are only so many innovations you can add before you break backwards compatibility. Intel's Itanium processor/architecture does this. Although Itanium maintains backward-compatibility with the Pentium instruction set, it's not hardware-compatible. Demand is so low that Intel has to make it really expensive ($5k each) to make any money on it.

    Consumer demand does drive chipmakers to innovate, but the market prefers a real, working, available, sanely priced product above anything else.

  6. Re:Stallman on Stallman Responds To GNOME Questionaire · · Score: 1
    Which is why I really dont understand why OSDN gives him so much press. Yes, he has done his part. But, it really ticks me off how you think we all hang off his every word. I dont, and I am willing to bet only a very tiny percentage do.

    Yes, but a larger percentage of geeks hang on Stallman's every word than on, say, Jon Katz's.

  7. Brave New World on First Cloned Human Embryo · · Score: 1

    Aldous Huxley's 1932 novel, Brave New World, is still an eerily prescient view of what can happen when a society gives over too much control to its government, allowing it to ban whatever types of knowledge it finds troublesome, control industry, and silence dissenting voices.

    The book also mentions cloning.

  8. Ideal Web Team on Organizing Your Web Services Division? · · Score: 4, Insightful

    Yeah, it makes sense to have a single group in charge of the company Web site. This eliminates duplication of effort and -- more importantly -- makes sure your whole site has uniform navigation and graphics so that users don't give up in disgust. Stuff like a single sign-on is also important for huge sites.

    For a medium-sized site, the team should consist of:

    • One person who can spel
    • One person who can coordinate colors
    • One person who knows how to reboot NT (or edit an .htaccess file), install patches, and who handles stress by kicking ass
    • One attractive, well-adjusted coder
    • One trained (web)monkey who can take copy and pictures from 3 million incompatible sources (i.e. your marketing and sales departments) and turn it into web pages

    It doesn't have to be exactly 5 people, but some number of people who combine to cover all these skills.

    Oh, yeah, I forgot a really important one:

    • One person with good tech vision who can make sure the other guys don't make things too hard for themselves. This is the person who makes sure the system everyone uses for plugging the content in doesn't get too complicated, that the programmer doesn't spend 80 hours trying to implement those dumb Javascript menus desired by Marketing, etc. This person is also the hard-nosed schedule Nazi who is responsible for Getting Things Done. He or she has to have a tech background, and must be able to communicate with the suits.

    This last person isn't necessarily more important than the others, but he/she is harder to find. Lots of projects fail for lack of this guy, the one who tells the other suits "That would be too expensive," and "That would take too long," who sets expectations so that when you (the programmer) have done a damn fine job, the rest of the company knows it.

    If you haven't been in industry yet, you have no idea how important that is.

  9. Re:And the surprise is...? on China Shuts Down 17,000 Internet Bars · · Score: 1
    Are our principles now to be sacrificed because we want cheap Chinese products? Can this country sink any lower?

    I agree that:

    • the decision to offer free trade to China had nothing to do with moral principles, and everything to do with cheap labor - and opening a huge market for U.S. goods;
    • ultimately it should have been a moral decision instead.

    But what exactly are these "principles" you're talking about? Are they along the lines of "Promote freedom"? Or does the little angel on your shoulder yell stuff like, "Don't trade with those Chinese, they're a bunch of Red Commie bastards!!!"?

    I think your principles (and mine, and those of Americans in general) are probably more like "Promote freedom and democracy - and thwart their enemies." And: "Live free or die."

    Flash back about 12 years. After the Gulf War, we isolated Iraq with UN sanctions. The result has been grinding poverty for the Iraqi people. The sanctions didn't promote Western freedoms there or destroy Saddam Hussein's government.

    But we were acting on our principles. What went wrong? Simple. You must make decisions based on what you know the result will be - not what the result would be in an ideal world. We knew the sanctions wouldn't really hurt Hussein. We knew they would hurt his people, though. We knew a few tens of thousands of civilians would die each month. And we knew Hussein would blame the U.S. for it.

    But we imposed the sanctions anyway, because ideally they would weaken Hussein, and his people, seeing that Hussein didn't have their best interests at heart, would rise in rebellion and overthrow their oppressors! Power to the people! Ahem.

    (What should we have done instead? I dunno. But we could have taken Baghdad, killed Hussein, destroyed Iraq's government, and instituted a UN-backed democracy there without killing anywhere near a million civilians, which is what the sanctions have done.)

    So what do we do about China? Is it better to isolate them economically? What does that achieve? Or does it matter? Maybe we don't care about the result. We just need to isolate China because they're a bunch of damn Commies.

    I don't buy it. If you want to do right, you have to think about the outcome.

    If anyone has the answer, let me know.

  10. Re:So what if ET... on (Mostly) Confirmed: New Mersenne Prime Found · · Score: 2, Interesting
    So what if ET hasn't found this number is prime yet? Won't he/she just think this 3,500,000 digit number is a bunch of gibberish?

    The assumption is that if ET is out there, he's a lot more technically advanced than we are. Human civilization has been around for, oh, call it 8,000 years. The universe is more than a million times that age. So ET has a big head start.

    My theory is that the universe is teeming with life, but everyone else is smart enough to keep a low profile. Only the humans like to broadcast to the universe an exact measure of how technically backwards we are.

  11. Prime stamp on (Mostly) Confirmed: New Mersenne Prime Found · · Score: 2, Informative
    http://www.utm.edu/research/primes/mersenne.shtml
    After the 23rd Mersenne prime was found at the University of Illinois, the mathematics department was so proud that they had their postage meter changed to stamp "2^11213-1 is prime" on each envelope.

    Does anyone have an envelope with this stamp on it?

  12. Re:Precedence and Associativity cause Unreadable C on Kent M. Pitman's Second Wind · · Score: 1

    Your message is (Score: -1, Troll), but I think this part deserves a response:

    By the way I think your little list of usability principles perfectly describes assembly language.

    True. Assembly language is off the other end of the scale, of course: it's too flat, the lines are too short and there are too many of them.

  13. Re:Precedence and Associativity cause Unreadable C on Kent M. Pitman's Second Wind · · Score: 1, Flamebait
    If you're just talking about readability, Lisp is much more readable than most other languages. Especially "popular" ones like C++ and Perl.

    Not to troll, but what are you smoking?!

    Did you get fired over a misplaced operator in the past, or something, and still hold a grudge against C? Because operator precedence is not the major obstacle to readability in any language. Let's talk about block structure.

    Lisp:

    (while (< (point) (match-end 2))
    (setq s (read (current-buffer)))
    (if (<= (point) (match-end 2))
    (setq tcl-default-command-switches
    (append tcl-default-command-switches
    (list (prin1-to-string s)))*))))))

    Java:

    if (imp==null)
    {IJ.noImage(); return;}

    if (arg.equals("reset")) {
    nLanes=0;
    saveID=imp.getID();
    if (plotsCanvas!=null) {
    plotsCanvas.reset();
    }
    *
    return;
    }

    I've inserted a star in each of these code snippets. Which block does the star fall in? This is what makes the C/C++/Java/Perl languages 30 times more readable, for all their faults, than the Lisp/Scheme family.

    What's that? You say Emacs has built-in support for helping you find out which s-expression the star is in? Dude. If you need a computer to help you read code, the code isn't readable.

    Let's be honest here. What are the real usability problems with languages?

    • C++: Well, it isn't operators. It's bad compiler messages. And templates. (e.g. for (list<IEye>::iterator i = boz.begin(); i != boz.end(); i++) { pitchfork.jab(*i); (*i).bleed(); })
    • Perl: All that $_<=>@*_ing punctuation. And a cultural bias against readability.
    • Java: Listeners and anonymous classes.
    • C: The compiler again. And a cultural bias against readability.
    • Python: None (it was developed by one of those annoying usability gurus)
    • Lisp: All those damn parens. You can say it's not a problem 'til you're blue in the face. But it is.

    I haven't done usability testing with programming languages. But I can guess what you'd find if you did:

    • One statement per line aids readability.
    • 30 lines of short, simple statements are easier to read than 10 longer, more complex lines.
    • A distinction between statements and expressions aids readability.
    • Deeply nested code and structures are confusing. Flatness is good.
    • Meaningful error messages help.

    Lisp goes against every one of these principles.

  14. Re:Okay, enough Lisp advocacy on Kent M. Pitman's Second Wind · · Score: 1

    You're right, the Java community is really dry. I guess it's because they're so damn busy all the time.

    They're busy learning all the new APIs that Sun is constantly cramming into Java (and cursing because the sample programs cause the JVM to crash).

    They're busy pulling their hair out because Java is mainly used in business and on large projects (a recipe for ulcers if not actual failure.)

    The Perl guys already got all their work done, so they have time to goof around. :)

    Seriously, the super-friendly community Perl has is its biggest asset. That kind of spirit has to come from the top. I believe Larry Wall, not Perl, is the reason Perl is so successful. (On the other hand, Perl is a lot more fun than most of the languages people learn in school.)

  15. Rotor-based encryption on Man Pleads Guilty to Stealing Enigma Machine · · Score: 1

    Perhaps slightly off-topic: Python has a builtin module, rotor , that provides rotor-based encryption. The documentation says: "The design is derived from the Enigma device, a machine used during World War II to encipher messages." Cool! Take it for a spin:

    >>> import rotor
    >>> r = rotor.newrotor('secretkey')
    >>> print r.encrypt('squeamish ossifrage')
    w&BYåÐmÒ®--"L