Slashdot Mirror


User: david.given

david.given's activity in the archive.

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

Comments · 1,291

  1. Re:Java bans operator overloading? on Overloading and Smooth Operators · · Score: 1
    Yes, that's the one exception. And one that one you should be very carefull with. Since Strings are immutable in Java, if you do "a" + "b" + "c", it will first create 3 Strings. Then it will add "a" and "b", creating a new String. Now *that* String will be formed into *another* new String by concatenating "c". That's quickly building up to the creation of a lot of String class instances. See "Effective Java" by Joshua Bloch.

    Except sometimes the compiler optimises this into creating a StringBuffer object, appending the Strings to it, and converting the StringBuffer back to a string once it's done... sometimes.

    Having fun yet?

    Grah.

    What's the current state-of-the-art on actual good languages that compile into JVM byte-code?

  2. Java bans operator overloading? on Overloading and Smooth Operators · · Score: 3, Informative
    Well, yeah, except when it doesn't...
    String a = "hello " + "world!";

    I love the smell of hypocrisy in the morning. It smells like... coffee.

    Seriously, operator overloading is a powerful technique that, done right, allows you to write clear, expressive, maintainable code. Done wrong it allows you to write foul spaghetti, but any language allows you to write foul spaghetti --- Flon's axiom: There does not now, nor will there ever, exist a programming language in which it is the least bit hard to write bad programs.

    Not allowing operator overloading (except when the language authors break their own rules) has no effect other than to reduce the options available to the programmer. It means that while you can't use them in cases where operator overloading is not useful, it also means that you can't use them in cases where operator overloading is useful and would produce better code. It means you can't, for example, create an imaginary number class that works the same way as int or long. This is not the mark of a good, extensible, expressive language.

  3. Re:SLS on An Old Hacker Slaps Up Slackware · · Score: 1
    darkstar... I seem to remember that from my first set of Slackware floppies. I think that was in '94 or '95. Got 'em from a friend. Unfortunately, after trashing my system several times and having to re-install from the countless floppies I was a little discouraged.

    Yeah, me too. While I did start out with floppies, my first real machine had Infomagic's Slackware distro installed off a very early CD... I had terrible trouble with that machine, because it dual-booted DOS, and my DOS session had the Stoned virus which encrypted the partition table. So Linux would run fine, until I booted DOS, at which point DOS would run fine, at which point booting Linux would fail. I finally sorted that out with the help of Seagate's excellent technical support, who eventually sent me a floppy disk with a low-level IDE formatter on it --- thanks, guys.

    Infomagic was interesting because it came with a bunch of extra software, including a closed-source binary-only Oberon development system, something I'd never seen before. I still have it somewhere, although being a pre-libc5 a.out executable getting it to run might be hard!

  4. Re:Hmmm, interesting projects on Google Summer of Code Results · · Score: 1
    Bandwidth Limiter For Apache...

    thttpd has had this since, well, forever. Since the binary is 70kB, has no dependencies, uses ludicrously small amounts of RAM, and scales far, far better than Apache, if you really need bandwidth limiting, there's nothing to stop you running this side-by-side with Apache!

    (thttpd's big weakness is dynamic content, since it uses a forked model of implementing CGI scripts; Apache beats it hands down there. But when it comes to static content, there are very few servers that do it better than thttpd. Plus you've got to love a web server that allows you to legitimately spit at your boss, whenever you try to pronounce it.)

  5. Re:No source? on Andy Tanenbaum Releases Minix 3 · · Score: 2, Informative
    I didn't find a tarball of source code, just the ISO image. When I loopback-mount the ISO image, I don't find anywhere near 80M of stuff. Is the source on the ISO image?

    Yes, it is --- it's on a Minix filesystem tucked away at the top of the ISO filesystem. If you boot the CD, you'll get a complete Minix LiveCD based system, with all the source on it.

    If you want to access it from Linux you'll need to persuade Linux to parse the partition table on the CD, which it normally won't do --- the easiest way to do this is to dd the whole lot off the CD and onto a scratch drive. Linux will then see the partition table, and you'll be able to find and mount the Minix filesystem.

  6. Re:It's all BSD licensed on Andy Tanenbaum Releases Minix 3 · · Score: 1
    That's actually almost as interesting as the OS itself - I take it from your comment it can build itself? A completely separate toolchain from the normal Linux toolchain which is also minimalist and BSD licensed... wow. Is minix3 actually something you could scale up to "real world" usage or does its focus on being a teaching OS sort of limit that?

    Yup. Log in as root, do cd /usr/src && make world install, and it'll rebuild and reinstall all libraries, binaries, the kernel, and the servers. A quick count (via find, wc -l and awk) reveals that /usr/src contains some 12000 lines of code.

    As for real-world usage --- if you'd care to define the term, I'd comment. Currently Minix lacks ssh (because OpenSSL depends on perl for its build process, which Minix doesn't have, and the libtomcrypt-based ssh implementation requires 64-bit int support, which the ACK doesn't have, and I haven't got gcc up and running yet), so I wouldn't use it for any heavy internet-related applications; but it should work really well for embedded systems. It ought to rock on a Gumstix.

  7. It's all BSD licensed on Andy Tanenbaum Releases Minix 3 · · Score: 4, Informative
    It's worth pointing out that one of Minix's great selling-points is that it's all BSD licensed --- including the tool chain. It doesn't use gcc by default; its native compiler is the BSD licensed Amsterdam Compiler Kit.

    This makes it, as far as I know, the only completely BSD licensed Unix-like operating system in the world. Even the big BSDs can't claim that, as they all rely on gcc.

    I was in on the Minix beta testing. It's actually extremely impressive. It's quite minimalist; most of the shell commands are pared down to their bare minimum --- for example, tar doesn't support the j or z flags --- and it tends towards SysV rather than BSD with things like options to ps. It runs happily on a 4MB 486 with 1GB of hard drive, with no virtual memory, and will contentedly churn through a complete rebuild without any trouble whatsoever. Slackware users will probably like it.

    Driver support isn't particularly great; apart from the usual communications port drivers, there's a small selection of supported network cards, a FDD driver, an IDE-ATA driver that supports CDROMs, and a BIOS hard disk driver for when you're using SCSI or USB or some other exotic storage. The VFS only supports a single filesystem, MinixFS (surprise, suprise!) but allows you multiple mountpoints. In order to read CDs or DOS floppies you need external commands.

    There's no GUI, of course.

    As a test, as part of the beta program, I did manage to get ipkg working on it. This required a fair bit of hacking, mostly due to ipkg assuming it was running on a gcc/Linux system, but it did work, and I found myself able to construct and install .ipk packages --- rather impressive. Now the real thing's been released, I need to revisit it.

    Oh, yeah, it has one of the nicest boot loaders I've ever seen --- it's programmable!

  8. Re:Oh Great! Not again. on Mars Polar Lander Lost Again · · Score: 1
    Why do people always say crazy things like this? Driving down the road at 70 MPH does not increase your body mass. You have to deal-with your body's kinetic energy. It makes little difference how much your car weighs (assuming you are hitting an immovable object).

    Um... um... because I was talking about E.E. Doc Smith physics, which bear only a passing resemblance to real world physics?

    You're right about that, of course. Mea culpa.

    You could also eliminate the need for crumple-zones if the seats, or perhaps the entire passenger compartment, was shock-mounted.

    However, I doubt you're right about that. Shock absorbers couldn't absorb nearly enough energy to slow the impact sufficiently. Remember that most cars are designed so that in the event of a head-on impact, the passenger compartment rides up over the engine compartment; that's a hell of a lot of mechanical deformation over the space of about a metre, a metre and a half. I doubt you'd find any shock absorber with the right characteristics that wasn't also based around bending a lot of metal, which rather defeats the point.

  9. Re:Oh Great! Not again. on Mars Polar Lander Lost Again · · Score: 3, Insightful
    If it weren't for gummint interference we'd have intergalactic travel and be driving around in cars made of Osnomean Arenak.

    Given the kind of crumple zones you'd get in a car made of arenak --- i.e. none at all --- I think I'll stick with plain steel, thanks. I don't like having all the kinetic energy of half a tonne of car travelling at 70 mph transferred to my torso via my seat belt!

    Of course, if you could fit the car with Bergenholms, that'd be a different matter, although I suspect that the kind of pinball game rush-hour traffic would become would be even more stressful than it currently is. At least when you're in a traffic jam you don't run the risk of ricocheting off some pensioner's pet gerbil and arriving on Mars.

  10. Re:Rather alarmist story... on ISS Orbit-Raising Attempt Fails · · Score: 2, Informative
    A better way to think about it is in terms of forces, not velocities. In order for an object to travel in a circle, there must be an inward-directed force, a centripetal force. Imagine you're swinging a ball on a string around your head. The ball travels in a circle because the string is continually applying an inward-directed force to it. For an object in orbit, this inward-directed force is gravity.

    Unfortunately, while this analogy is technically more accurate, it's not actually useful --- because the when you imagine the ball being swung around your head, your intuition only considers the centrifugal force: the ball is pulling on your hand. Our built-in physics systems doesn't consider centripetal force to be useful, so we never notice it. This tends to lead people to dismiss this particular analogy as being incomprehensible.

    The continuously-falling-but-always-missing analogy is less accurate, but gives a better feel for what's going on. Orbital mechanics are, fundamentally, counterintuitive. Remember "East takes you out, out takes you west, west takes you in and in takes you east"? That's the sort of thing you're up against.

  11. Re:hmmm, is there a missing party here? on How Can a Programmer Make Everyone Happy? · · Score: 5, Informative
    My manager took me to "the room" again. I tried to remain calm, waiting for the accolades, perhaps even a bonus? But, he pointed his finger in my face and said, "Don't you ever deliver more to the client than you say you will!". Stunned silence.

    Hate to say it, but in both cases here, he was absolutely right. You're an engineer. You don't deal with customers on anything other than the purely technical level. What you were doing --- making estimates, adding functionality --- was making business decisions. You got away with it this time but you were running the risk of seriously screwing up any business relationships your company was participating in. For example, in the business with the estimate, what would have happened had the customer insisted on going by your estimate and not your manager's (doubled) estimate? At a stroke you would have halved the company's billable hours. Not good. The only way they could have gotten out of that is by telling the customer that you'd spoken out of turn, which would probably have led to you being told to find another job.

    First rule of dealing with customers: find out exactly what your responsibility is, and don't overstep it. If the customer asks about a new feature, say, "That sounds feasible, but of course I'll have to run it by X first," where X is your business contact. Or even better, say, "You'll have to talk to X about that, I'm afraid." This is the kind of thing management is for; use it...

  12. Re:Delta of Danube on Deadly Version of Bird Flu Found in Romania · · Score: 2, Informative
    What's more, sometimes a virus will fail to work properly. It'll inject its genetic material into the cell, but won't turn the cell into a virus-producing engine.

    The cell will then quite happily duplicate the virus' DNA when it next divides. If the cell happens to be a somatic cell, generating sperm or egg cells, then the virus' DNA can be replicated among all the cells in the creature's offspring! There are parts of the human gene sequence that have been positively identified as originating from viruses. Yes, Virginia, your great-great-great-great-great-great-grandad was an Influenza Z virus.

    Combine this with another viral failure mode, where bits of host DNA get caught up in the viruses the slave cell is producing, and you have a perfectly viable mechanism for allowing bits of DNA from one species being introduced into the gene pool of an entirely different, normally incompatible species. This has actually happened.

    Genetics isn't nearly as cut and dried as you might think...

  13. Methinks their survey software need work on Project Massive's Latest Findings · · Score: 4, Interesting
    How long have you played None?
    How good of a game is None overall?

    Hmm.

    Plus, a lot of the questions are badly worded. For example, one question is:

    • How many of your online friends have you met through gaming?

    The options are:

    • I have no online friends
    • 10%
    • 20%
    • etc

    Well, I have online friends, but I didn't meet any of them through gaming; I met them via BBSes and MUDs. This means I'd want to select 0%, but there isn't an option --- I have no online friends simply isn't true.

    Plus, there are occasional questions like How many hours do you spend attending to work/school/life responsibilities in the average week? What the hell does that mean? In one sense the answer is All of it, but I think it's actually trying to ask how much time I have that isn't what I consider to be free time. It could be much better worded.

    A lot of the questions are like that, and some are worse, and I've had to leave a lot of the entries blank. This doesn't give a lot of confidence in their results...

  14. Steerable? on Distant Planet Imaging Project Gets More Funding · · Score: 5, Insightful
    This thing appears to be a giant pinhole camera; there's a pinhole, which can be considered the lens assembly, which focuses light onto the sensor, 50'000km behind.

    Very cool. However, there's one little problem --- how the hell do you turn it? If the sensor's got to be 50'000km away from the lens, then to turn it 90 degrees (why does Slashdot block Unicode?) you're going to have to move the sensor some 70'000km, which means a lot of hydrazine.

    Or do they have something more cunning up their sleeves?

  15. Re:Unintended consequence of regulation and contro on Consultant Convicted For Non-Invasive Site Access · · Score: 4, Funny
    The UK has preceded the US in destroying the basic rights of its citizens, replacing laws against violence with laws against rights.

    However, we still don't have any laws against trolling. Shame, really...

  16. Re:Propietary Software Industry on Shuttleworth on Ubuntu's Direction and Intent · · Score: 4, Informative
    From available evidence, the outstanding majority. In fact, a majority (approx. 90% by some counts) of all programmers already do earn a living working directly for companies that use the software, rather than for those companies which sell software for others to use.

    Don't forget the third option: I work for a company that produces software that is licensed to hardware manufacturers who then ship actual devices. Mobile phones, in my case. The software is never sold directly to the primary users of the software.

    I suspect there's a hell of lot of this going on, too.

  17. Re:Autopilot on Airbus A380 Under Fire · · Score: 5, Informative
    They were trying to take off, and the enhanced autopilot decided they were trying to land and took over, so it got about 100ft off the ground and started heading back down, off the end of the runway and into a forest. Nice large fireball too.

    Sorry, that's incorrect.

    What you're talking about here is Air France Flight 296. There's a full description on the link, but the short version is that the pilot tried to throttle up because the plane was too low, and the fly-by-wire system overrode him due to a fault. Nothing to do with the autopilot at all --- autopilot landings are quite common these days.

    (There's also been a lot of controversy about that accident, because there are a number of irregularities with the investigation indicating that the evidence has been tampered with. Check out this link for more information.)

    (Oh, yes; only three people died, although about 50 were injured.)

  18. Re:Information freed! on How Chinese Evade Government's Web Controls · · Score: 3, Insightful
    ...no law can trump humanity's moral law...

    Humanity's what? That's a totally meaningless phrase.

    Every person in this world has the God-given (or inherent) right to speak.

    And this is a dangerous phrase. You have exactly one inherent right: to die. I, for one, intend to put off exercising that right as long as possible. What you are talking about here is a privilege, and like all privileges, it must be worked for. Denying this is going to lead to exactly the phenomenon you're seeing in the US: erosion of civil liberties because people aren't willing to work for them --- because, after all, if they're God-given rights then God will look after them, right?

    Remember: there is no one true way. You believe it is morally correct to allow people to say what they will, simply because you live in a culture that thinks that is important. Other cultures are different, and assuming that your values are valid for a culture as radically different as China's is is simply incorrect. I'm not denying that China's government is doing some pretty nasty things, but simply saying that they're wrong and you're right is a vast oversimplification of the issues.

  19. Re:Personally, I've noticed the opposite. on Is the iPod Generation Going Deaf? · · Score: 2, Interesting
    Consequently, this behavior makes me realize that I need a quieter PC case.

    A while back I tried to figure out how to do this on the cheap; I eventually ended up with the computer box in the attic, with long wires connecting up the keyboard and monitor. USB was ideal for I/O, but I didn't have a USB CD drive so instead I used a slightly over-spec IDE cable --- which eventually turned out to be unreliable if I had DMA turned on, which was less than ideal. If I were doing it today, I'd use Firewire.

    It was an incredible bodge job, and did involve having to cut a hole in the ceiling, but pressing the switch on the wall and hearing the slight bong as the monitor powered up --- and nothing else --- was wonderful. You won't realise how wonderful a truly silent computer is until you get one.

  20. Re:Arrrr! on First Cocktail 5,000 Years Old · · Score: 2, Funny
    Everyone know that grog be rum and water.

    Nonsense. Grog is, as every real pirate knows, a secret mixure containing the following:

    • Kerosene
    • Glycol acid
    • Artificial sweeteners
    • Sulfuric acid
    • Rum
    • Acetone
    • Red dye #2
    • Scumm
    • Axle grease
    • Battery acid
    • And/or pepperoni.

    Rum and water? Pah. You fight like a cow.

  21. Re:Err... on FFVII Advent Children Leaked · · Score: 5, Funny
    Isn't linking directly to a pirated movie download a bit bald faced for a NEWS SOURCE?

    This is Slashdot. How long do you think that link's going to keep working?

  22. What exactly... on Higher Game Prices Explored · · Score: 1
    ...does the phrase 'price point' mean?

    As far as I can tell, it is exactly synonymous with 'price'. This means that the second word conveys no meaning whatsoever, and so is a waste of everybody's time.

    Remember, kiddies. Friends don't let friends speak like marketroids.

  23. Re:A fraud, according to the OSNews community. on 6.8GHz 1TB RAM and 2TB HDD Laptop? · · Score: 1
    Well, if nothing else gives it away, how about the image of the stereo connector with a bunch of labels on it describing the optical components and the massive memory it contains:

    Not discounting the fact that this whole thing looks about as bogus as a whale with nine legs, I actually have a connector such as they describe --- it's a 3.5mm stereo jack with a optic fibre down the core. It's used as the optical in for my Minidisc Walkman. If I were prototyping some funky new technology that needed three electrical lines and a fibre-optic line, then yes, I might decide to use one of those...

  24. What do you mean, laptop 'bag'? on What's In Your Laptop Bag? · · Score: 3, Interesting
    A while ago, my brother, who's an archaeologist, had to take his new, expensive Toshiba T1200 around various places in the middle east. He considered buying a laptop bag, but realised that carrying a bag with a 'STEAL ME NOW' sign on it probably wasn't such a good thing in the seedier quarters of Cairo.

    What he eventually ended up with was a bible case. It was cheap, provided excellent protection, was just the right size (this was an A4-sized notebook), and above all else --- who wants to steal a bible?

  25. Re:groan on Scientist Says Most Scientific Papers Are Wrong · · Score: 1
    That, however, does not mean it isn't true. For instance, gravity isn't really "falsifiable" in that it is taken for granted because it affects us all. Anyone trying to disprove that there is not an attraction force between an object near earth and the earth itself would be laughed out of any scientific discussion.

    Don't people teach theory of science these days?

    Science is a three-stage process:

    1. Observation
    2. Hypothesis
    3. Experimentation

    Observation is: hey, look, when I let go of something it falls down! Let's call this gravity.

    Hypothesis is: When I drop something, it appears to accelerate downwards at a particular rate. I can express this mathematically as an equation.

    Experimentation is: Does this hypothesis actually hold up when we test it? Can I break it? What happens if the mass is really big/really far away/really strangely shaped?

    For something to be science, it must be observable, you must be able to construct useful theories about it, and you must be able to test your theories. ID fails all these criteria. We haven't managed to observe any ID actually happening; you can't come up with any useful theories given the basic proposal; and it's not testable.

    The only reason the ID movement lives at all is that evolution (in all its various forms) only barely counts as science itself. Evolution operates at too great a timescale to be readily observable, although speciation has been observed on the small scale. The best you can do is to study the past in as much detail as you can and to try and reconstruct what happened millions of years ago, which is not a particularly precise way of making measurements. Likewise, barring access to a time machine it's quite hard to do large-scale experiments: you can try to come up with a model which predicts forthcoming evidence, or matches the existing evidence, but that's not quite the same thing.

    Most theories of evolution, however, do try to be sciences, which ID doesn't. From what I've seen, most of the vocal ID proponents only seem to want to follow the rules when it's in their favour --- they'll loudly criticise the various forms of evolutionary theory for fairly minor issues, and then dismiss criticisms against their own theory as being quibbles. Rather than playing the science game, they seem far more interested in winning debating points, and that's not how science works.