Slashdot Mirror


User: EvanED

EvanED's activity in the archive.

Stories
0
Comments
6,434
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 6,434

  1. Re:Java and the operator overloading.. on What I Hate About Your Programming Language · · Score: 1

    Yeah, uh, it stripped the <
    *Technically* they are the bit-shift operators; the C++ ios classes overload them as the stream insertion and extraction operators. I can see how die-hard C programmers could get a little annoyed at the "misuse" of << and >>, but to anyone who has started with C++ or Java, they are second-nature.

    Poll: Which is more readable:
    a. cout << "The value of i is " << i << "\n";

    b. cout.out("The value of i is").out(i).out("\n");

    c. cout.out("The value of i is"); cout.out(i);
    cout.out("\n");

    d. printf("The value of i is %i",i);

    Now, I'm one of those people that started with C++, but I'll take (a) any day. You'll probably say (d), but I had to look up the printf control characters to be sure that I wanted %i. It depends on what you're used to.

  2. Re:Java and the operator overloading.. on What I Hate About Your Programming Language · · Score: 1

    ...which works until someone makes Decrement() map to Increment() and bury it into some obsure library.

    Don't you see? Operators are just functions that are called a little funny. You want to prevent me from making a function called -- that adds instead of subtracts? Then you should also prevent me from making a function called Decrement() that adds instead of subtracts, and prevent me from making a variable called 'filename' that would be better called 'command', and prevent me from making a class called 'ComplexNumber' that would better be refered to as 'MainWindow'. They are all the same.

  3. Re:Java and the operator overloading.. on What I Hate About Your Programming Language · · Score: 1

    >>Next a lot of people are overloading operators while destroying basic mathematical rules operators have!

    First of all, That's not 's fault any more than it is if add(a,b) != add(b,a). That's entirely the programmer's fault.

    >>Even the string concation also violates a basic mathematical rule '+' follows.

    Which is wonderous that Java *includes* that then...

    But anyway, this argument is stupid anyway. Even things within the mathematical world don't always obey commutitivity/associativity/distributivity(?) anyway. Look at matrices. In general, A*B != B*A, yet mathematicians didn't come up with a new operator to do matrix multiplication. Actually, this is the only example I can think of at the moment since I'm fresh out of an introductory linear algebra course, but I'm sure there are examples of other things that don't behave as well as you'd like.

  4. Re:What does overloading look like in English? on What I Hate About Your Programming Language · · Score: 1

    >>New functions are just that--they're new. They do not override any preconceived notions about what they're supposed to do.

    Yes they do... in particular, the names of the function. I don't see any difference between the danger of people abusing overloading operators for things they were not meant for and the danger of people naming functions things that aren't descriptive enough or are downright misleading.

    I can write a function called add() that does nothing of the sort, and feel that if the framers of Java don't trust me enough to use the + operator correctly, the shouldn't trust me enough to name functions correctly.

    (OK, that said, I will admit that because operator overloading can be somewhat of a "oh, neat... look what I can do!" feature, it has a greater potential to be overused by people who are learning. But after you use + a few times to do fancy operations, the novelty should wear off.)

  5. Re:Java and the operator overloading.. on What I Hate About Your Programming Language · · Score: 1

    *Technically* they are the bit-shift operators; the C++ ios classes overload them as the stream insertion and extraction operators. I can see how die-hard C programmers could get a little annoyed at the "misuse" of >, but to anyone who has started with C++ or Java, they are second-nature.

    Poll: Which is more readable:
    a. cout "The value of i is " i "\n";

    b. cout.out("The value of i is").out(i).out("\n");

    c. cout.out("The value of i is"); cout.out(i);
    cout.out("\n");

    d. printf("The value of i is %i",i);

    Now, I'm one of those people that started with C++, but I'll take (a) any day. You'll probably say (d), but I had to look up the printf control characters to be sure that I wanted %i. It depends on what you're used to.

  6. Re:Java and the operator overloading.. on What I Hate About Your Programming Language · · Score: 5, Insightful

    But, there are MANY times when operator overloading would make things sooo much easier. Which would you rather read:

    complex z1(0,1);
    complex z2(1,0);
    complex z3 = z1+z2;

    or

    complex z1(0,1);
    complex z2(1,0);
    complex z3 = complexMath.Add(z1, z2);
    ?

    (The second is still better than z3=z1.Add(z2) IMHO)

    I'll take the first any day.

  7. Re:At the end of the day... on What I Hate About Your Programming Language · · Score: 4, Funny

    >>I wish some higher level languages would force the use of comments in code, make it part of the declaration for a class or function.

    I'm not sure if that would help... how many "// fucking compiler requires this" comments would you see?

  8. Re:Perfectly reasonable on RIAA Apologizes for Incorrect Infringement Notice · · Score: 1

    I did. In fact, it's the OED. And you're wrong:

    steal, v(1)

    I. To take dishonestly or secretly. ....
    d. In wider sense: To take or appropriate dishonestly (anything belonging to another, whether material or immaterial). [dates from 1275]

    -The OED online

  9. Re:Why are we always nitpicking? on Shuttle Politics · · Score: 1

    Then why didn't they do that in the first place, instead of undertaking a hugely complicated and difficult operation to think up, design, build, and install the corrective lenses?

  10. Re:What is an acceptable risk? on Shuttle Politics · · Score: 1

    If I thought that it would work reliably, without breaking, without falling down, and was capable of everything the shuttle fleet is, I'd be all for making it and greatly reducing the role of the shuttle. However, while I am not at all qualified to make any reasonable judgements on it, I have the slightest that creating such an elevator would be more trouble and cost more than keeping the shuttle going.

  11. Re:What is an acceptable risk? on Shuttle Politics · · Score: 1

    >>But seriously, the shuttle travels about 200 useful miles -- 100 miles up, and 100 miles down. The fact that it happens to travel a half million miles in the wrong direction while it's doing that is more of a design flaw than a feature.

    What?! Dude, you got it backwards. The *useful* milage is that half a million miles. That's where the satellites are deployed. That's where the experiments are conducted. That where the photography is taken. That's where satellites are retrieved and fixed.

    The 200 miles up and down are the *least* useful miles on the whole trip!

  12. Re:Why are we always nitpicking? on Shuttle Politics · · Score: 1

    >>The circumstances of the Challenger disaster were quite different - that one could easily have been avoided, and should have been.

    Hindsight is always 20/20... I'll have to wait for the final report to come out, but for a while, Columbia's investigation looked a little like the Challenger's: NASA was warned about a problem, didn't fix it, crash. It's not as severe as the Challenger's poor joint design, at least from the perspective I have. But who knows... maybe in 10 years people will look back and say "they should have seen it coming." I doubt it, but you never know.

  13. Re:Why are we always nitpicking? on Shuttle Politics · · Score: 1

    >>With as much money as was spent on hubble, would they have figured out an automated deployment scheme if manned flights were unavailable?

    They could have put it up just fine, but when they discovered that it was fucked the chance that they could have done something with machines is very small.

  14. Re:It is a superior format on Widescreen (Finally) Winning · · Score: 1

    Nope, widescreen TVs are 16:9, or 1.78:1. So even on widescreen TVs you'll have bars with even a 1:85:1 movie.

  15. Re:Release date on MS Says Longhorn To Arrive 2005 · · Score: 1

    Bingo, and this is why it was rightfully an antitrust violation. However, as you don't need to uninstall IE in order to use another browser (and if you say you do, you're welcome to come to my dorm to see a counterexample), I agree with the parent was that the main reason IE is dominant is that it is simply better.

  16. Re:Netscape Feature I Like on MS Says Longhorn To Arrive 2005 · · Score: 1

    I use Mozilla with the mouse gesture plug in, and I find it like mouse scroll wheels. If I go onto a browser without it, I try to use them anyway, just as when I sit down with a non-wheeled mouse, I'll try to use the wheel anyway.

  17. Re: All in Wonder on Preserving VHS Recordings For Another 20 Years? · · Score: 1

    Well, each bit either works or doesn't, but you could have various bits fail disrupting the picture.

  18. Re:ATI All In Wonder on Preserving VHS Recordings For Another 20 Years? · · Score: 1

    Or a giant trace of the waveform.

  19. Re:ATI All In Wonder on Preserving VHS Recordings For Another 20 Years? · · Score: 1

    Forget political correctness... I'm wondering more about how you can hire slaves...

  20. Re:Just like printer ink refills. on AMD: No Grease For You! · · Score: 1

    >>As far as overclocking goes, last I checked overclocking in and of itself voided the warantee on most processors. If you want to push the thing beyond its intended limits, fine, but don't expect me to pay for it (via increased prices) if it breaks. That's like saying that my car warantee should cover the damage from driving off a cliff at 100 mph while fleeing the cops.

    That's fine. But at the same time, don't give me a product (the fan) that will break in under 8 months of use. Remember, OCing is not at all the only reason you'd need a different fan/heat sink.

  21. Re:How is this reasonable? on AMD: No Grease For You! · · Score: 1

    >>how many replacement heatsinks do you typically buy for your CPUs during their useful lifetime?

    Well, seeing as between the three most recent computers me and my family have had (which are those that are still in reasonable use) I've seen 5 fans die. One (P-100) had the original fan die. Then the replacement fan die. My dad replaced it with a 120 mm or something fan he screded to the case and pointed at the processor. Athlon 500: came with TWO processor fans (this was one of the slot processors, so the heatsink was plenty long enough). Both died. Again, replaced with an 120 mm. Athlon XP 2000+: stock fan died in 8 months. Replaced with a ThermalTake Volcano.

  22. Re:let me explain the problem on AMD: No Grease For You! · · Score: 1

    >>The fan on the "stock heatsink" they talk about is less than quiet, but more importantly is poor enough that in many cases it will not even last the life of the warranty on the CPU.

    Mine died completely a couple weeks ago, after under 8 months of use. It's been malfunctioning for a couple months.

  23. Re:In related news... on Linus on DRM · · Score: 1

    The point is that if you distribute a binary, you have to distribute the source *that was used to build that binary*. In other words, if you build it on your computer with the key and distribute that binary, you must include the header file with that key.

  24. Re:In related news... on Linus on DRM · · Score: 1

    This post is correct; the header file is needed for compilation, thus it must be distributed. If the kernel read in the key somehow as it booted, they yeah, you'd be fine distributing your binaries. But if the key is needed at compilation time, it must be provided with the rest of the source.

  25. Re:In related news... on Linus on DRM · · Score: 1

    There's a misunderstanding here: the superpatent is not saying that you can release the binary built off your header, only that you can release the source and have people build their own. This is pefectly OK: under the GPL you don't have to distribute the version you have on your computer personally, and you can distribute the slightly different one.

    However, distributing the binary that you're using without the key in the header file *IS* in violation of the GPL.

    Disclaimer: IANAL.