Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror
×

Comment Re:There was a bigger mistake: (Score 1) 612

But since you use C to write more optimized code, using one byte for the terminator uses less space than using N bytes to memorize the actual string length, unless you're fine with strings with max length of 255.

In almost all cases, that's a false economy. Okay, in the worst case you use one word instead of one byte for the string. In lots of cases, though, the fact that you want memory regions to be word-aligned means that you will end up allocating the N-1 bytes anyway.

And, in return:
  * String equality will take only 2 memory reads if the strings are two different lengths
  * String concatenations take O(n_2) time, where n_2 is the length of the second string, instead of O(n_1+n_2).
  * Getting the string length is a constant time operation.
  * Operations that need to check for buffer overflow can do a single cheap check at the beginning of the operation.
  * You don't have the development, debugging and support costs associated with the all-too-common off-by-one and overflow bugs.

Comment Re:Obviously (Score 1) 493

Yes.

First of all, IBM isn't unionized. There is a small, fledgling union, but it isn't able to do any collective bargaining. It has no say in IBM wages. So, in this case, there are NO "legacy costs" due to the union.

Secondly, for Fortune 500 companies, 10% of profits are eaten up by the wages and benefits of the top executives. So, yes, there is a significant cost that is due to paying out money to the elite executives.

Comment Misleading article (Score 1) 1

This article is amazingly misleading! If you are concerned about this, go read the Fictionwise FAQ about this: http://www.fictionwise.com/help/Overdrive-Replacement-FAQ.htm

First of all, despite the article's implication, less than 4% of Fictionwise's books were purchased through Overdrive.

Secondly, no ebooks are "vanishing". If you have one of the unlucky 4% books, you'll still be able to read it. You just won't be able to download another copy of the file from Fictionwise. For a number of DRM formats, you'll even be able to read the books on any new devices you get in the future!

And thirdly, for 80% of the affected books, Fictionwise will provide another copy of the books in another format. They are still working to get the remaining 20% converted.

So, all-in-all, this is hardly a big deal.

Slashdot Top Deals

UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things. -- Doug Gwyn

Working...