Slashdot Mirror


User: nerdwarrior

nerdwarrior's activity in the archive.

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

Comments · 37

  1. My top 3: Sussman & Wisdom, Dirac and Penrose on Good Physics Books For a Math PhD Student? · · Score: 1

    Sussman & Wisdom's "Structure and Interpretation of Classical Mechanics" is a must-read. It presents the very general Lagrangian formulation of classical mechanics using a clear, unambiguous Scheme-like language. It's a gem. (Sussman's "Structure and Interpretation of Computer Programs" was the intro CS book at MIT for years.)

    Dirac's "Principles of Quantum Mechanics" is a highly readable introduction to the field. Dirac didn't (and couldn't) assume much prior knowledge. This book is the origin of the supremely clever bra-key notation.

    Roger Penrose's "Road to Reality" is an engaging coverage of much of modern physics as well as the prerequisite mathematics.

  2. My best on Time Saving Linux Desktop Tips? · · Score: 4, Informative
    In no particular order:
    • ion | ratpoision; Pane-based (v. window-based) window managers. Little to no wasted screen real estate. Significantly reduced mouse usage.
    • emacs: Wickedly powerful text editor/operating environment.
      • WhizzyTeX: Updates DVI in another window as you edit TeX/LaTeX.
      • AUCTeX: Very powerful emacs extensions for TeX/LaTeX.
    • fetchmail + procmail + mutt + spamassassin + msmtp: No-nonsense mail reading and sending.
    • bash completions: Quasi-telepathic tab completion.
    • Firefox
      • Adblock: Saves an astonishing amount of screen real estate.
    • screen: Among many other abilities, screen+ssh can provide VNC-like capabilities for your terminal sessions.
  3. Re:Cool code no longer means fast on Java Urban Performance Legends · · Score: 5, Insightful

    Except, you're wrong. You're assuming that the compiler is doing *no* optimization. So, how would a compiler treat the first "inefficient" code example? Let's take a look:

    public double getDistanceFrom(Component other) {
    Point otherLocation = other.getLocation();
    int deltaX = otherLocation.x - location.x;
    int deltaY = otherLocation.getY() - location.getY();
    return Math.sqrt(deltaX*deltaX + deltaY*deltaY);
    }

    Look at the implementation of getLocation(). It's a simple non-recursive procedure. In virtually all compilers, a simple procedure like this is going to be inlined, producing:

    public double getDistanceFrom(Component other) {
    Point otherLocation = new Point(other.location) ;
    int deltaX = otherLocation.getX() - location.getX();
    int deltaY = otherLocation.getY() - location.getY();
    return Math.sqrt(deltaX*deltaX + deltaY*deltaY);
    }

    (Note that to the compiler, all variables are effectively public, so this would not be an access violation.)

    Next, the compiler can (easily) prove (by inspection) that Point(Point) is a copying constructor. As a result, it can replace the use of new Point(other.location) with other.location so long as it proves it will not modify otherLocation, and of course, it can prove this quite easily by inspection of getDistanceFrom(). This results in:

    public double getDistanceFrom(Component other) {
    Point otherLocation = other.location ;
    int deltaX = otherLocation.getX() - location.getX();
    int deltaY = otherLocation.getY() - location.getY();
    return Math.sqrt(deltaX*deltaX + deltaY*deltaY);
    }

    Also, note that getX() and getY() are also simple non-recursive leaf procedures, so the compiler would have inlined them at the same time, so you would actually get code equivalent to this:

    public double getDistanceFrom(Component other) {
    Point otherLocation = other.location ;
    int deltaX = otherLocation.x - location.y;
    int deltaY = otherLocation.y - location.y;
    return Math.sqrt(deltaX*deltaX + deltaY*deltaY);
    }

    Which is now faster that your hand-written "optimization." Note in fact, that you "over-optimized" by replacing otherLocation with other.location twice. If a compiler were actually dumb enough to implement it that way, literally, it would have involved an extra (and needless) pointer dereference to get the value of other.location twice, when it already had it sitting in a register. (Fortunally, most any compiler nowadays would have caught your "optimization" and fixed it.)

    In fact, the compiler wouldn't stop here. It might even rearrange the order in which it fetches x and y to avoid cache pollution and misses. Do you consider that each time you fetch a variable? Most programmers don't, and shouldn't. The moral of the story is that most programmers fail to realize how smart compilers have become. Compiler writers design optimizations with "good coding practices" such as this in mind, and the programmer will be rewarded if he or she uses them.

  4. Re:Implementation in languages? on Protothreads and Other Wicked C Tricks · · Score: 1

    Try call-with-current-continuation (a.k.a. call/cc) in Scheme or any of the other functional languages. call/cc lets you write co-routines (and many other powerful control constructs) quite easily, and co-routines are much more powerful than this protothread trick. A favorite for Schemers showing off the power of call/cc is the amb macro (which uses call/cc internally). The following code can actually be written in Scheme (after adding the amb and assert macros): (let ((x (amb 1 2 3)) (y (amb 4 5 6))) (begin (assert (= (+ x y) 7) ; once execution reaches here, x and y have values such that x + y = 7. ...))) amb "magically" chooses one of its arguments which causes the computation to eventually succeed. Under the hood, amb uses call/cc to save away the current context and backtrack when a failure occurs.

  5. A lambda poem on Brain Teasers for Coders? · · Score: 1
    This applies more to the functional language/lambda calculus community than the C community, but here's a lambda poem that I like:

    What is the meaning of (call/cc call/cc) and how might you use it in a program?

  6. Re:Give me a break! on Kerry Concedes Election To Bush · · Score: 1

    Rather than just guessing and hypothesizing. Let's make an attempt to find some facts:

    http://www.cnn.com/ELECTION/2004/pages/results/s ta tes/US/P/00/epolls.0.html

    Scroll down to education.

    So, for a while, increasing education level makes one more conservative, but after a while, education makes one increasing liberal. (Note where Nader's support came from.)

    Interesting, eh?

  7. Recent studies... on The Command Line - Best Newbie Interface? · · Score: 1

    ...have shown it's also much harder for CLI users to click on email attachments in Outlook.

  8. It would be MUCH cheaper this time. on President Bush To Call For Return To Moon? · · Score: 2, Funny
    Think about it. We could outsource all the engineering and programming to India. Then, we could ship all the high-tech manufacturing to China. Oh, and while we're at it, Russian cosmonauts work for just hundreds a month, so we wouldn't need to waste our money on overpaid American astronauts. We could even outsource mission control to a call center in India. ("Is the power to the moon base on?" "Have you tried rebooting the moon base?") Imagine the savings!


    With all these cost-cutting measures available, we could have an American moonbase for a quarter the price!

  9. This is old technology on Fast TCP To Increase Speed Of File Transfers? · · Score: 4, Insightful

    Measuring the round-trip time for packets and using this to information to predict the bandwidth delay product is nothing new. This is essentially one of the effects achieved with existing TCP congestion control algorithms such as TCP Tahoe, TCP Vegas and TCP Reno. The article is light on details and doesn't lead me to believe that they've done anything signicantly different from these three. Furthermore, if it *is* doing something different, how can it still obey the existing congestion control algorithms without thrashing? After all, we can all boost the speed of our TCP connections by simply turning off congestion control, as long as nobody else does it either. ;) [UDP's lack of congestion control is precisely why a few streaming video users can clog up an entire pipe for themselves, screwing everyone else who's using it.]

  10. A more technical analysis/critique on Students Use 802.11g To Save Cable Industry · · Score: 5, Insightful
    Problem 0: Packet Loss on 802.11

    Packet loss rates for 802.11 can become atrocious when you do something as simple as close a door. It might not be so great if every TV in the house needed line-of-sight to the 802.11 transmitter to get decent picture quality.

    Problem 1: UDP and Congestion

    One of the benefits of using a protocol like TCP is that congestion control can (and has been) added in. UDP, on the other hand, has no means of congestion control. The morale of the story is that all programs in your entire neighborhood using TCP could grind to a halt if your neighbor decides to use all 3 of his TVs at the same time.

    Problem 2: Privacy

    So, now anyone with a 802.11-equipped laptop and a packet sniffer can figure out what I'm watching? Even if it's "encrypted" as they say it is, what algorithms are they using? How are they handling key distribution?

    Problem 3: Security/Theft

    "Security is taken into account to ensure that no bandwidth that consumers pay for is stolen. The signal broadcasted by the wireless router to all devices would be encrypted to the receiver. Each receiver would have a unique identification address that associates it with a specific receiver. Therefore, if one receiver is reported missing by a customer, that receiver is able to be deactivated before the cable company replaces it. For computers, a closed Access point could easily be setup to ensure that data bandwidth is not misappropriated. This security system makes certain that only paying customers have access to appropriate content."

    What in God's name does the above mean? Once the signal is out over wireless, anyone can grab it. And, once it's over ip, you can tunnel it to any of your neighbors.

    Also, what if someone packet spoofs the video server with your address to start sending a new channel? How could you even detect that this was happening? Or, if someone wants to DoS you, they can just spoof a request for a whole bunch of channels.

    Some of these problems are sovable, but there is not nearly enough "technical detail."

    Blatant Fallacy: Cable Gaming

    Move all the processing to the server and just broadcast the image? In the current model, server and client exchange minimal information about the state of the world in very compact formats. In their model, the client sends minimal information and server sends streaming video! This is hardly more efficient, especially since the cable company now has to have a gaming-class computer sitting in their office for every single customer who wants to play games at the same time! Oh, and what about lag? Do you really want to wait 100ms-1s for the command to be sent, processed and sent back? The lag would be horrific. I'm afraid that with current prices and technology, distributing tasks like graphics rendering are cheaper.

    Grar, I can't stand these guys who dream up this crap and then pretend its possible.

  11. No on read the article or looked at the spec. on Remote Direct Memory Access Over IP · · Score: 5, Informative
    This technology is not what the headline claims.

    First, what the headline would have you believe has been invented is making it appear as though the RAM of one machine is really the RAM of another machine. This technology has been around and used for quite some time in clustered/distributed/parallel computing communities since at least the 1980s.

    If you look at a brief summary of the spec, http://www.rdmaconsortium.org/home/PressReleaseOct 30.pdf, you'll find that all that's happening is that more of the network stack's functionality has been pushed into the NIC. This prevents the CPU from hammering both memory and the bus as it copies data between buffers for various layers of the networking stack.

    I'll also note that the networking code in the linux kernel was extensively redesigned to do minimal (and usually no) copying between layers, thereby providing very little advantage of pushing this into hardware.

    Please, folks, don't drink and submit!

  12. My internet life is totally unchanged on How Has Post-9/11 Legislation Affected You? · · Score: 1
    9/11 and its legislation has done absolutely nothing to how I use the internet.

    For me, 9/11 changed one thing about my life's routines, and that's how long it takes me to get through the airport.

    I think all those people who think the internet was a "casualty" should realize that very little has changed.

  13. From a Tech Student's Perspective... on Georgia Tech Cracks Down on Learning · · Score: 4, Informative

    I'm a graduate student in CS at Georgia Tech, and I recently graduated from their undergraduate program.

    Georgia Tech is in no way against teamwork. In fact, in many LATER courses, it is not only encouraged, but required to pass. In the introductory course, however, students are expected receive a firm foundation in the BASICS of programming and computer science like recursion, searching, sorting, algorithmic complexity, data structures, trees, graphs, etc. If a student cheats his way through ANY of these concepts, and expects to survive a later computer science course, he will not only damage his own grade, but the grade of his teammates as well.

    I'd also like to point out a couple things either pushed aside or conveniently not mentioned in the article. First, the student in question was NOT accused of discussing his assignment with another student. To my knowledge, regular discussion of assignments is a very commonplace occurrence--especially on the four newsgroups available for the class. He was accused for CHEATING. No cheatfinder, however good, is going to find out if people DISCUSSED anything. It's only going to find people who have VERY similar, copied, code. Secondly, I'd like to mention that the person in question is also, apparently, the son of a Washington Post editor.

  14. Re:WRONG on One-Time Pad Encryption With No Pad? · · Score: 1

    You retard. You can crack a PRNG-based "O"TP with a known plaintext/ciphertext attack. And, yes, it's easy to get plaintext.

  15. No problems here on Do Manufacturers Adequately Support Their Products? · · Score: 1

    I've had the same 7500 for 2 years, and now I've got an 8000. Neither a problem with either.

  16. Earth = Round on Wanted - 45 Mile Wireless Broadband? · · Score: 1

    Don't forget that the horizon is only 3 miles off! 45 miles away means you won't have an LoS for a wireless connection assuming the sites are both at ground level.

  17. Just what Trek needed! on Star Trek: Enterprise Reactions? · · Score: 1

    This is just what Trek needed---a ship named Enterprise, a bold captain and no reservations about whoopin' ass. (They do need to ditch the theme music, though.)

  18. Hoax on Bill Gates's email - about Linux · · Score: 1

    Sorry, but it screams hoax.

  19. Bad for us, good for them on H-1B Visas Increased In 96-To-1 Vote · · Score: 1
    For businesses and the US economy as a whole, anytime the supply of the high tech workers shifts outward, our wages go down and the amount we produce goes up, and this is favorable to consumers and corporations.

    For us, however, it's bad, since our wages *will* be driven down, and it will become a little more difficult to find a job.

  20. Atlanta? Georgia Tech = Gigantic Nerd House on Constructing A Geek House · · Score: 1

    If you're in Atlanta, look no further than Georgia Tech. The dorms are literally zoos of us nerds, and we even have some women here.

  21. My message... on KEO Time Capsule To Remain In Orbit 'Til 52001 AD · · Score: 1

    #include
    #include <stdlib.h>

    int main (int argc, char* argv[])
    {
    printf("Hello, future!\n") ;
    return EXIT_SUCCESS ;
    }

  22. Teaching Computer Science v. Teaching Languages on Coding Classes & Required Development Environments? · · Score: 1
    I think the fact that you're in an "entry-level C++ class" is problematic. Teaching programming isn't about teaching languages. It's about teaching how to write programs. Anyone who wants be a programmer some day should be able to teach themselves a programming language's syntax and semantics with in a day to a week.

    I go to Georgia Tech, and we don't waste time teaching languages here. Here, we're expected to learn (by ourselves) whatever language the class happens to use. This allows a true computer science curriculum where the focus is algorithms, theory, software engineering, etc. instead of Java, C++, C, etc.

    Some of our classes here even allow you to program in any language you want (so long as a TA or prof can grade it) because the focus of a CS curriculum is recognizedly not learning programming languages. Learning programming languages is recognized as an easy teach-yourself topic.

  23. Re:Danger to Culture--Danger to Economics on Napster Aftermath: Fan Vs. Corporate Rights · · Score: 1

    What I said has nothing to do with communism or capitalism--it has to do with economics. I myself am a capitalist, BTW. In a society under communism the idea of consumer surplus and producer surplus don't even exist. Consumer surplus and producer surplus measure how much better off consumers and producers are as a result of the ability to freely produce and trade. You can mathematically prove that the benefits to consumers from Napster outweigh any losses to producers in this case. The economic solution to all this of course is for there to be a flat fee for monthly usage of Napster which covers the fixed costs of the production of the music, as the marginal cost has shrunk to 0. This sort of scheme can still tap the same amount of previously untappable social surplus and still allow producers to cover their costs of production.

  24. Danger to Culture--Danger to Economics on Napster Aftermath: Fan Vs. Corporate Rights · · Score: 2

    If you've taken a course in economics, it's not hard to see that a popularly created culture is not the only thing at stake. Entities like Napster create VAST quantities of previously untappable consumer surplus WITHOUT seriously damaging (and even possibly enhancing) producer surplus. Therefore, even IF the record labels are a little worse off due to Napster, society as a whole is FAR better off.

  25. Boycott! on Napster Shut Down Until Trial · · Score: 1

    If we want to send a message to the RIAA, hit'm in their pocket books--where it counts! I hereby *REFUSE* to buy CDs in stores now. And, yes, I have bought CDs in the recent past, such as the Gladiator soundtrack, which I did sample via mp3.