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.
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.
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.
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.)
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!
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.]
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.
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.
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.
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.
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.)
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.
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.
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.
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.
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.
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.
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.
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.
What is the meaning of (call/cc call/cc) and how might you use it in a program?
Rather than just guessing and hypothesizing. Let's make an attempt to find some facts:
s ta tes/US/P/00/epolls.0.html
http://www.cnn.com/ELECTION/2004/pages/results/
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?
...have shown it's also much harder for CLI users to click on email attachments in Outlook.
With all these cost-cutting measures available, we could have an American moonbase for a quarter the price!
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.]
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.
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!
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.
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.
You retard. You can crack a PRNG-based "O"TP with a known plaintext/ciphertext attack. And, yes, it's easy to get plaintext.
I've had the same 7500 for 2 years, and now I've got an 8000. Neither a problem with either.
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.
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.)
Sorry, but it screams hoax.
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.
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.
#include
#include <stdlib.h>
int main (int argc, char* argv[])
{
printf("Hello, future!\n") ;
return EXIT_SUCCESS ;
}
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.
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.
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.
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.