Maybe the title should be changed
on
Hijacking .NET
·
· Score: 5, Insightful
Maybe the title of this book should be changed to "1001 ways to write bad code". Relying on undocumented private members of classes violates encapsulation and pretty much guarantees that your code will not work with (a) compatible implementations on other platforms, and probably also (b) future versions on the same platform. Just Say No, is my advice.
Don't they teach English in schools anymore? Or are they just teaching it wrong? It's "Royalty-Free Standards", so people's brains can instantly know that it isn't to be read as "Royalty Free-Standards".
I consider my English pretty good, and I thought you were wrong there. So I dug out my Oxford Manual of Style to look up what it said about the case. And I must concede you were right. For anyone interested in why, here's the rule:
"Hyphenate two or more modifiers preceding the noun when they form a unit modifying the noun" and gives the example "a stainless-steel table", as opposed to "a table of stainless steel".
Just stop and think about that for a while in PC terms... "I replaced my motherboard with the power on without rebooting my system, while it was serving 10,000 web pages a second."
There are PC compatible systems you can do that with. I understand IBM's Netfinity is in that category.
First of all, it's perfectly OK to serve the dynamic content without a content-length header.
No it isn't. If a keep-alive connection is being used there has to be some way for the client to know when the server has finished sending data so that it can send the next request. Keep-alive is important because it substantially reduces the amount of traffic used in serving multiple small requests.
Second of all, the whole point of the content-length header is so that the client knows how much data will come and is thus able to allocate memory, see whether it will be able to process the whole content and display a progress bar. All of these are not possible with chunked encoding, so you get none of the benefits from content-length. Why not drop it in the first place?
See my answer to the previous question
Not having a content-length header has only one drawback: it breaks keep-alive connections.
OK, so you answered your own question. So why did you ask it?
But since sane sites are compressing their dynamic content anyway to save bandwidth cost and make it appear quicker on the client machine, and dynamic HTML pages of 100k typically compress down to below 10k because HTML is so bloated, there really is no point in not buffering those 10k.
1. Not all clients support dynamically compressed content. 2. Many servers do not provide dynamically compressed content because it is heavy on CPU load. 3. I have frequently served pages which are much larger than 100K. 4. The issue isn't memory allocation, its speed of response. Dynamic pages can take a long time to generate. With chunked encoding you can send the start of the page before the end of it has been generated.
[memory considerations snipped] Also, if you do the buffering, you can add the content-length header and get all the benefits.
Except for the speed of transfer. Basically, chunked encoding is faster than buffering and sending content length. Would you rather wait around for several seconds before your pages start loading so that you can get a nice progress bar for the shorter period of time while they actually are downloading?
Great. Really useful feature. I wouldn't call it overlooked though, seeing as almost all modern web servers will automatically use it when sending output from a scripted page.
Strictly speaking, RFCs are not standards -- only government-sanctioned bodies can issue standards.
I agree with the former; I disagree with the latter. Have you never heard of industry standards? As I understand it, many organisations (such as IEEE and the ITU) are not sanctioned by government (at least not in all countries) but do issue standards which are generally accepted and followed.
The IETF is such an organisation. It issues standards. However, RFCs aren't standards. RFCs become standards at a later pointer in their cycle. See: http://rfc.net/std-index.html
I do not see how things would become much more dangerous in Java if you added a delete operator to complement the new operator. The operator would have the semantics that meant "delete, now". If you tried to access a deleted object, it would throw an exception.
And how would you implement this feature? I can think of three approaches:
- All references use a unique object serial number that is looked up in some kind of associative structure to find the pointer to the actual object. This would probably slow reference operations down by a factor of about 10, and would therefore be unacceptable from a performance perspective.
- The 'delete' operation performs a mark & sweep operation through all data in the system hunting for pointers to the deleted object. This would work and wouldn't be unacceptably detrimental to processes that don't use it. However, I fail to see any benefit this has over 'objectref = null; System.gc(); System.runFinalizers();'.
- References are stored as 8 bytes; 4 bytes as a pointer to the object and 4 as a unique id for the object. The object's ID is checked on each reference operation. This would probably be a bit faster than the first suggestion, but would increase memory usage by about 30% for a typical application (more for applications that use many small objects).
Re:Dragged kicking and screaming...
on
The Law and P2P
·
· Score: 1
Well, of course not. But the point is that they don't even offer the option of doing so at the moment, which is shear short-sighted stupidity on their behalf.
Of course, what they want to do is search your hard disk for all your illegal MP3s and then fine you hundreds of millions of dollars for each one they find...
handwriting recognition is predictive (ie: it differentiates between a captial I, lowercase L, and numerial 1 by the characters that came before or after). In random sequences (read: good passwords), this fails miserably.
That's because passwords (as used at the moment) are designed for keyboard use. Once the use of devices like this becomes common, alternatives will arise. Passwords can be replaced by drawing complex abstract patterns (kind of like a signature). For remote access, the pattern would be processed through some kind of hashing function to produce an alphanumeric password.
OK, own up, who modded that offtopic. Title of article: "What's Microsoft Up To?". Link to an article which contains an interview with Microsoft's CEO. Offtopic how?
Re:Dragged kicking and screaming...
on
The Law and P2P
·
· Score: 4, Interesting
What is needed is an application that scans your MP3 (or whatever) collection, matches up artists with labels through some database and allow you to choose what you already have a paid-for copy of to remove from the list (it would store this information for later use). Then it would calculate a cost for a licence for your entire MP3 collection. A bulk discount would be applied for people with thousands. Then you could whip out your credit card and make that 10Gb legal.
I understood that the decision rested primarily on the fact that these networks were determined to have significant uses other than copyright infringement, rather than their distributedness? Am I wrong, or is this article wrong?
The uniprocessor box had one ethernet card, while the 8-way box had eight ethernet cards [...] I wouldn't call this a normal real-world configuration.
Yeah, but the results looked pretty similar from the single processor box to the others, and fairly consistent with the difference between (1) reading a file from disk & sending it over the network and (2) reading the file, writing back the updated inode and sending the file.
I wouldn't really complain if they'd treated the two systems the same. If both were out of the box installations, then I'd agree that even if the results were contrived there are probably situations where they apply.
But to enable an optimisation that is available on both systems on one of them only is ridiculous.
Also note that I suspect less people are aware that you _can_ do this on Windows, where registry level hacks like this are generally discouraged, than know about it under Linux where it is a simple modification to one of the core configuration files (/etc/fstab) whose meaning is well explained and all options presented in a logical fashion in the fstab manual page, and the mount page which it refers the reader to.
What document supplied with Windows tells you how to do the same thing?
Re:I'm always skeptical when someone tries to sell
on
What's Microsoft Up To?
·
· Score: 5, Interesting
They disabled last access time updating under windows. They didn't under Linux. This is enough to account for these differences, I suspect.
Re:Time to find another architecture for OpenSourc
on
Microsoft's Athens PC
·
· Score: 1
This was bound to happen sooner or later. Microsoft, Intel and AMD are ALL anti-OpenSource
Excuse me? Intel have done quite a lot of work that has benefited open source projects, including giving away a large volume of library code. AMD might not have openly espoused open source, but they have frequently encouraged open source projects that use their technologies (we had a substantial amount of cooperation from them on the NASM project when we were implementing the 3DNow! instruction set, and I understand the x86-64 linux port got quite a bit of help as well). Microsoft is the only one that deserves to be on that list.
What the OpenSource community needs to do is rally behind another architecture to ensure its survival. This can either be Sparc, plain-vanilla PowerPC systems, or both.
While I admire both of these systems for their elegance and power, I wouldn't seriously suggest that this move would be a good idea. Why? A quick browse suggests that a 500MHz Sparc processor would cost in the region of $2000. While I appreciate that this probably outperforms a 1GHz pentium, it hardly competes in cost. PowerPC G4 seems a little more competitive, I can see 500 MHz processors for under $200. I'm not sure how these compare speedwise with pentiums, but the same price will get you a 1.4GHz Pentium III. I doubt the PowerPC chip can compete.
Fortunately, all programs written for Linux will work on all Linux-supported architectures, and if they don't, they can always compiled on these architectures.
That's not quite true, although they should if they have been written carefully. I suspect there are quite a few that don't, though.
Re:Not talking about the high-end Pro Tools - RTFA
on
Cheap Audio Production
·
· Score: 1
I dunno about the cost of all the odds & ends, but I can get a 10 in/10 out low latency 96KHz DAC card for a PC for about £400 ($600), including break out boxes (apparently, haven't tried it out yet). Yeah, sure, your mikes and instruments are going to cost a fair bit, and you need a soundproofed room if you're going to do anything serious. But $15,000 sounds fair enough to me. _I_ could do the lot for that.
What I want to know is, is there any free software that approaches this stuff in utility? I've played around with audacity, which is quite good (I've used it to multitrack a few bits from my guitar with some quite good results), but was wondering if there's anything better...?
Re:ProTools is a large reason modern music sucks
on
Cheap Audio Production
·
· Score: 2, Funny
If you believe in Love after Life, then you're pretty twisted.
I dunno, Bram Stoker made a career out of that storyline.
why aren't the benefits of lower production costs being passed on to the consumer?
I suspect its because 99% of the cost of producing commercially successful records is not (and never has been) studio related. Sure, studio time costs a fair bit, but never anything like the amount of money that is typically spent on publicity, production, promotion, distribution, and stuff like that.
Cutting down the first tree caused no harm. Saving the last tree wouldn't have prevented the massive population crash. The details would have been changed in each case, but in a century you would still have ended up with a heavily forested island or a stripped one.
But during a long period in the middle they could have changed the outcome *in either direction* by seemingly small changes. That's the chaotic realm - it was impossible to where any simple change would lead.
I disagree that this is chaotic. I suspect that there was some number of trees that, if cut down, would have been OK, and that number + 1 would have not been OK. Now, it would be _extremely_ different to calculate this (as a lot of other factors influence it), but that doesn't make it chaotic.
Chaotic would be if there was a region in the middle where based on knowing the outcome of chopping down 'n' trees you couldn't really say anything sensible about the outcome of either 'n-1' or 'n+1' trees.
It is an inordinately complex system that we lack any suitable knowledge to model, but I don't think it was chaotic.
With the correct knowledge specified to a reasonable degree of accuracy, I think it could have been predicted.
For those who don't know (I graduated in '97 and my computer architectures course had no mention of it, so it must be a fairly recent development...) EPIC standards for 'Explicitly Parallel Instruction Code' and basically means (as far as I can tell from a 5 min google) that stuff like instruction reordering for the parallel execution cores is handled by the compiler, rather than the processor (the theory being that the compiler should be better at it).
I think this makes it orthogonal to RISC/CISC/VLIW architecture and I believe Itanium owes the most to RISC, although this isn't explicitly acknowledged anywhere I've found and my theory might be a bit rusty...
but certainly, dynamic recompilation _has_ to beat emulation (except for startup speed). Apart from anything else, the new CPU has more registers to take advantage of so redundant store/load (or push/pop) cycles can be eliminated in the recompilation with a little data flow analysis...
A good example is UK where the Customs and Excise department staged ambushes on roads in Wales last year to stop cars that do not smell of abnoxious gasoline fumes and require them to immediately present a document that proves that their fuel has paid fuel duty. Any cars that could not prove this on the spot were impounded.
What's your source for this story? Given my understanding of UK law, this is not a power that C&E legally have. They can demand proof that tax has been paid, but they'd have to give you 7 days to do so (similar procedure to requiring you to produce a drivers licence, etc.).
Although there are cases where they could prove at the road side that there was sufficient cause to believe no duty had been paid (eg. if a vehicle's fuel tank was found to contain red diesel), and I think they might be able to do it in these cases.
The UK government has done anything in their power to make sure that the uptake of [gas powered cars] is only token and very low and is done in a way that cannot use household gas so that it does not hit their revenue stream.
If by household gas you mean mains pumped gas, there are technical issues that make it tricky to refuel at home anyway. Besides, LPG powered cars are currently very appealing because of lower duties on LPG than petrol/diesel. (I don't know the taxation levels, but LPG currently costs about 45p/litre, while petrol/diesel are at around the 80p/litre mark). The recently introduced London "congestion charge" offers a discount (or is it an exemption? I can't remember) for LPG or electrically powered vehicles.
That doesn't sound like the government discouraging the use of alternative fuels to me.
Maybe the title of this book should be changed to "1001 ways to write bad code". Relying on undocumented private members of classes violates encapsulation and pretty much guarantees that your code will not work with (a) compatible implementations on other platforms, and probably also (b) future versions on the same platform. Just Say No, is my advice.
Don't they teach English in schools anymore? Or are they just teaching it wrong? It's "Royalty-Free Standards", so people's brains can instantly know that it isn't to be read as "Royalty Free-Standards".
I consider my English pretty good, and I thought you were wrong there. So I dug out my Oxford Manual of Style to look up what it said about the case. And I must concede you were right. For anyone interested in why, here's the rule:
"Hyphenate two or more modifiers preceding the noun when they form a unit modifying the noun" and gives the example "a stainless-steel table", as opposed to "a table of stainless steel".
Live and learn.
So you do.
Just stop and think about that for a while in PC terms... "I replaced my motherboard with the power on without rebooting my system, while it was serving 10,000 web pages a second."
There are PC compatible systems you can do that with. I understand IBM's Netfinity is in that category.
I figure XHTML 2 is going to require a big re-design of everything anyway, why not design an HTTP 2.0 to go with it?
Why?
First of all, it's perfectly OK to serve the dynamic content without a content-length header.
No it isn't. If a keep-alive connection is being used there has to be some way for the client to know when the server has finished sending data so that it can send the next request. Keep-alive is important because it substantially reduces the amount of traffic used in serving multiple small requests.
Second of all, the whole point of the content-length header is so that the client knows how much data will come and is thus able to allocate memory, see whether it will be able to process the whole content and display a progress bar. All of these are not possible with chunked encoding, so you get none of the benefits from content-length. Why not drop it in the first place?
See my answer to the previous question
Not having a content-length header has only one drawback: it breaks keep-alive connections.
OK, so you answered your own question. So why did you ask it?
But since sane sites are compressing their dynamic content anyway to save bandwidth cost and make it appear quicker on the client machine, and dynamic HTML pages of 100k typically compress down to below 10k because HTML is so bloated, there really is no point in not buffering those 10k.
1. Not all clients support dynamically compressed content.
2. Many servers do not provide dynamically compressed content because it is heavy on CPU load.
3. I have frequently served pages which are much larger than 100K.
4. The issue isn't memory allocation, its speed of response. Dynamic pages can take a long time to generate. With chunked encoding you can send the start of the page before the end of it has been generated.
[memory considerations snipped] Also, if you do the buffering, you can add the content-length header and get all the benefits.
Except for the speed of transfer. Basically, chunked encoding is faster than buffering and sending content length. Would you rather wait around for several seconds before your pages start loading so that you can get a nice progress bar for the shorter period of time while they actually are downloading?
reload a couple of times
I got 013 Unexpected Error on all of them. Is it broken?
chunked encoding.
Great. Really useful feature. I wouldn't call it overlooked though, seeing as almost all modern web servers will automatically use it when sending output from a scripted page.
Strictly speaking, RFCs are not standards -- only government-sanctioned bodies can issue standards.
I agree with the former; I disagree with the latter. Have you never heard of industry standards? As I understand it, many organisations (such as IEEE and the ITU) are not sanctioned by government (at least not in all countries) but do issue standards which are generally accepted and followed.
The IETF is such an organisation. It issues standards. However, RFCs aren't standards. RFCs become standards at a later pointer in their cycle. See: http://rfc.net/std-index.html
NB: HTTP is not a standard.
Nah. He's probably the one that wants to know how to put the internet on a floppy disk so he can send it to his friend.
I do not see how things would become much more dangerous in Java if you added a delete operator to complement the new operator. The operator would have the semantics that meant "delete, now". If you tried to access a deleted object, it would throw an exception.
And how would you implement this feature? I can think of three approaches:
- All references use a unique object serial number that is looked up in some kind of associative structure to find the pointer to the actual object. This would probably slow reference operations down by a factor of about 10, and would therefore be unacceptable from a performance perspective.
- The 'delete' operation performs a mark & sweep operation through all data in the system hunting for pointers to the deleted object. This would work and wouldn't be unacceptably detrimental to processes that don't use it. However, I fail to see any benefit this has over 'objectref = null; System.gc(); System.runFinalizers();'.
- References are stored as 8 bytes; 4 bytes as a pointer to the object and 4 as a unique id for the object. The object's ID is checked on each reference operation. This would probably be a bit faster than the first suggestion, but would increase memory usage by about 30% for a typical application (more for applications that use many small objects).
Well, of course not. But the point is that they don't even offer the option of doing so at the moment, which is shear short-sighted stupidity on their behalf.
Of course, what they want to do is search your hard disk for all your illegal MP3s and then fine you hundreds of millions of dollars for each one they find...
I would if I had time. Setting up that kind of test would take hours though...
handwriting recognition is predictive (ie: it differentiates between a captial I, lowercase L, and numerial 1 by the characters that came before or after). In random sequences (read: good passwords), this fails miserably.
That's because passwords (as used at the moment) are designed for keyboard use. Once the use of devices like this becomes common, alternatives will arise. Passwords can be replaced by drawing complex abstract patterns (kind of like a signature). For remote access, the pattern would be processed through some kind of hashing function to produce an alphanumeric password.
OK, own up, who modded that offtopic. Title of article: "What's Microsoft Up To?". Link to an article which contains an interview with Microsoft's CEO. Offtopic how?
What is needed is an application that scans your MP3 (or whatever) collection, matches up artists with labels through some database and allow you to choose what you already have a paid-for copy of to remove from the list (it would store this information for later use). Then it would calculate a cost for a licence for your entire MP3 collection. A bulk discount would be applied for people with thousands. Then you could whip out your credit card and make that 10Gb legal.
I know people who would do this if they could.
I understood that the decision rested primarily on the fact that these networks were determined to have significant uses other than copyright infringement, rather than their distributedness? Am I wrong, or is this article wrong?
The uniprocessor box had one ethernet card, while the 8-way box had eight ethernet cards [...] I wouldn't call this a normal real-world configuration.
Yeah, but the results looked pretty similar from the single processor box to the others, and fairly consistent with the difference between (1) reading a file from disk & sending it over the network and (2) reading the file, writing back the updated inode and sending the file.
I wouldn't really complain if they'd treated the two systems the same. If both were out of the box installations, then I'd agree that even if the results were contrived there are probably situations where they apply.
But to enable an optimisation that is available on both systems on one of them only is ridiculous.
Also note that I suspect less people are aware that you _can_ do this on Windows, where registry level hacks like this are generally discouraged, than know about it under Linux where it is a simple modification to one of the core configuration files (/etc/fstab) whose meaning is well explained and all options presented in a logical fashion in the fstab manual page, and the mount page which it refers the reader to.
What document supplied with Windows tells you how to do the same thing?
They disabled last access time updating under windows. They didn't under Linux. This is enough to account for these differences, I suspect.
This was bound to happen sooner or later. Microsoft, Intel and AMD are ALL anti-OpenSource
Excuse me? Intel have done quite a lot of work that has benefited open source projects, including giving away a large volume of library code. AMD might not have openly espoused open source, but they have frequently encouraged open source projects that use their technologies (we had a substantial amount of cooperation from them on the NASM project when we were implementing the 3DNow! instruction set, and I understand the x86-64 linux port got quite a bit of help as well). Microsoft is the only one that deserves to be on that list.
What the OpenSource community needs to do is rally behind another architecture to ensure its survival. This can either be Sparc, plain-vanilla PowerPC systems, or both.
While I admire both of these systems for their elegance and power, I wouldn't seriously suggest that this move would be a good idea. Why? A quick browse suggests that a 500MHz Sparc processor would cost in the region of $2000. While I appreciate that this probably outperforms a 1GHz pentium, it hardly competes in cost. PowerPC G4 seems a little more competitive, I can see 500 MHz processors for under $200. I'm not sure how these compare speedwise with pentiums, but the same price will get you a 1.4GHz Pentium III. I doubt the PowerPC chip can compete.
Fortunately, all programs written for Linux will work on all Linux-supported architectures, and if they don't, they can always compiled on these architectures.
That's not quite true, although they should if they have been written carefully. I suspect there are quite a few that don't, though.
I dunno about the cost of all the odds & ends, but I can get a 10 in/10 out low latency 96KHz DAC card for a PC for about £400 ($600), including break out boxes (apparently, haven't tried it out yet). Yeah, sure, your mikes and instruments are going to cost a fair bit, and you need a soundproofed room if you're going to do anything serious. But $15,000 sounds fair enough to me. _I_ could do the lot for that.
What I want to know is, is there any free software that approaches this stuff in utility? I've played around with audacity, which is quite good (I've used it to multitrack a few bits from my guitar with some quite good results), but was wondering if there's anything better...?
If you believe in Love after Life, then you're pretty twisted.
I dunno, Bram Stoker made a career out of that storyline.
Oh.
why aren't the benefits of lower production costs being passed on to the consumer?
I suspect its because 99% of the cost of producing commercially successful records is not (and never has been) studio related. Sure, studio time costs a fair bit, but never anything like the amount of money that is typically spent on publicity, production, promotion, distribution, and stuff like that.
Cutting down the first tree caused no harm. Saving the last tree wouldn't have prevented the massive population crash. The details would have been changed in each case, but in a century you would still have ended up with a heavily forested island or a stripped one.
But during a long period in the middle they could have changed the outcome *in either direction* by seemingly small changes. That's the chaotic realm - it was impossible to where any simple change would lead.
I disagree that this is chaotic. I suspect that there was some number of trees that, if cut down, would have been OK, and that number + 1 would have not been OK. Now, it would be _extremely_ different to calculate this (as a lot of other factors influence it), but that doesn't make it chaotic.
Chaotic would be if there was a region in the middle where based on knowing the outcome of chopping down 'n' trees you couldn't really say anything sensible about the outcome of either 'n-1' or 'n+1' trees.
It is an inordinately complex system that we lack any suitable knowledge to model, but I don't think it was chaotic.
With the correct knowledge specified to a reasonable degree of accuracy, I think it could have been predicted.
For those who don't know (I graduated in '97 and my computer architectures course had no mention of it, so it must be a fairly recent development...) EPIC standards for 'Explicitly Parallel Instruction Code' and basically means (as far as I can tell from a 5 min google) that stuff like instruction reordering for the parallel execution cores is handled by the compiler, rather than the processor (the theory being that the compiler should be better at it).
I think this makes it orthogonal to RISC/CISC/VLIW architecture and I believe Itanium owes the most to RISC, although this isn't explicitly acknowledged anywhere I've found and my theory might be a bit rusty...
but certainly, dynamic recompilation _has_ to beat emulation (except for startup speed). Apart from anything else, the new CPU has more registers to take advantage of so redundant store/load (or push/pop) cycles can be eliminated in the recompilation with a little data flow analysis...
A good example is UK where the Customs and Excise department staged ambushes on roads in Wales last year to stop cars that do not smell of abnoxious gasoline fumes and require them to immediately present a document that proves that their fuel has paid fuel duty. Any cars that could not prove this on the spot were impounded.
What's your source for this story? Given my understanding of UK law, this is not a power that C&E legally have. They can demand proof that tax has been paid, but they'd have to give you 7 days to do so (similar procedure to requiring you to produce a drivers licence, etc.).
Although there are cases where they could prove at the road side that there was sufficient cause to believe no duty had been paid (eg. if a vehicle's fuel tank was found to contain red diesel), and I think they might be able to do it in these cases.
The UK government has done anything in their power to make sure that the uptake of [gas powered cars] is only token and very low and is done in a way that cannot use household gas so that it does not hit their revenue stream.
If by household gas you mean mains pumped gas, there are technical issues that make it tricky to refuel at home anyway. Besides, LPG powered cars are currently very appealing because of lower duties on LPG than petrol/diesel. (I don't know the taxation levels, but LPG currently costs about 45p/litre, while petrol/diesel are at around the 80p/litre mark). The recently introduced London "congestion charge" offers a discount (or is it an exemption? I can't remember) for LPG or electrically powered vehicles.
That doesn't sound like the government discouraging the use of alternative fuels to me.