Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×

Comment Re:Actually, I think it's a great tactic (Score 2, Insightful) 411

Okay, currently in NC businesses which sell directly to NC residents collect sales tax, but NC businesses which sell to NC residents via Amazon don't. Whether or not you agree with NC's proposal, there are more factors here which I don't think you've considered.

the founders of this great nation realized that smuggling was a good thing

To the contrary, the United States was set up as a nation of laws and with the assumption that there would be taxes. There's nothing that excuses smugglers from the legal system.

But there is no reason why the governments should have license to grow when its supporting economy just dropped 20%.

Firstly, the proposed change in no way "grows" the government. It is simply an additional revenue stream. Secondly, since as you say the economy has dropped 20%, that means that NC is collecting about 20% less revenue. I highly doubt that this proposal will even come close to making up for this, so in total NC's revenue will be shrinking, not growing.

To argue otherwise is to argue that you can tax a nation into prosperity, or that you can lift yourself up by your boot straps.

Actually, there are good reasons why you want to do this.

First of all, the state's expenditures naturally increase during a recession. Why? Firstly, the basic costs of maintaining infrastructure do not decrease drastically: potholes in highways still need to be fixed, electric poles which fall during a storm need to be repaired, etc.

Secondly, consider that the 20% drop in the economy is not applied evenly. This year nearly 50% of college graduates didn't manage to find jobs. That is a lot of talent that is being wasted. Also, for example, some friends of mine used to be a two-income family until, in one week, one was laid off and the other had a 30% pay cut. That's a family that is now trying to live on one-third of their usual income, but their mortgage payments aren't any lower. As a result there is a lot of capable people who suddenly find themselves in deep financial trouble, if not homeless.

Because of this, the state's unemployment insurance program, its support for working families who aren't able to afford enough food for their children, homeless shelters, etc experience a large increase in the number of applicants. So, the costs of these programs rise, at the exact time that revenue falls.

What is the state to do? Not only would it be immoral to let people starve to death, it is foolish: dead people will never get jobs and help the economy in the future. You want all these talented people to be earning money, not dying in a tent city.

Instead, you DO want to have new government programs to help the economy. Take some of those unemployed civil engineering graduates and have them design better infrastructure for the cities, and then hire other unemployed people to build it. Not only do you get to enjoy the benefits in the future, but the newly employed people then spend their pay at local shops and stores, which means that those businesses have more sales, which means that they no longer have to lay people off or go bankrupt. This will improve the economy, and once it has recovered any loans that had to be made can be paid off. This just makes sense, and has worked before.

Comment Re:Forgive my ignorance WAS:re: Garbage collector? (Score 1) 587

A lot of other people have replied to the parent post, saying quite correctly that avoiding memory leaks is hard in practice. However, there are also other reasons as well:

  • If you do allocation manually, you also have to worry about freeing something twice. The result of that is usually rather nasty, including creating ways for attackers to break into the system.
  • Garbage collection is usually faster than manual allocation -- see Urban Performance Legends, Revisited
  • Garbage collection allows objects to be compacted in memory, which increases locality and hence performance greatly.

Comment Reference Counting != Garbage Collection (Score 5, Informative) 587

No, no, no! Creating a cycle of object references does not cause a memory leak in Java!

You are assuming that a garbage collector uses reference counting. However, reference counting doesn't work for the very reason you state, and therefore GCs don't do it that way. They actually check whether an object is usable by the program, and not just whether it has any old reference to it.

Comment Re:Let Java do it for you. (Score 2, Interesting) 486

Until you're trying to do something for which Java has no standard API. Last time I checked, USB joysticks were like this. There is JInput, but if you include JInput in your distribution, your project is no longer 100% Pure Java and will not run as an applet.

But your C/C++ code is never able to be run as an applet, while Java code might. So, on these grounds Java is better.

Or unless your target platform is incapable of running managed code. Some handheld platforms have only 4 MB of RAM, not enough for a JIT compiler and the bytecode in addition to the translated code except in trivial examples that act a generation old.

And for that we have Java ME edition.

Okay, there are devices that are even more tiny in which C or assembly is the only option. I've also dealt with a processor that couldn't be programmed in C without extensive non-standard C extensions. Either way, this is a small minority of situations -- there is no one solution that suits all purposes.

And per Apple's developer agreement, the only managed language that can run on an iPod Touch is JavaScript in Safari.

And they allow just any old C code to run?!!

Or unless your existing program's model is written in an unmanaged language, and you want to reuse the old code so that you can be sure that the model is bit-for-bit accurate. How hard is it to automatically translate C code to, say, C++/CLI?

Eeek! Don't do this!

If you want bit-by-bit accuracy, you absolutely don't want to try translating C code to C++! You even have to worry about changing C compilers if you are doing that. (And yes, I have worked with C code which would break if we used a different compiler. It was not fun.)

What you should be thinking of doing is to write an interface between the existing model code and your new one. This can be done in both C++ and Java. When the new code has to manipulate the model, it goes through this interface and calls the old code to do the necessary operation.

Comment Re:Just so you know... (Score 1) 597

So, you admit that the patent on making ham and cheese sandwiches that survive being frozen and microwaved is not just a matter of "mixing two substances together." Great, we're getting somewhere!

Now, you are maintaining that adding Criso and calcium stearate to the sandwich is "extremely" obvious. Well, naturally, simply everyone has calcium stearate in their kitchen cupboard, ready to apply at a moment's notice. But I think I'd need a little bit of persuasion to convince me that Crisco is an obvious thing to add to a sandwich.

But maybe you are just a natural food scientist and don't realize how special you are. Could be. Why don't you just point us to some of your food patents, then?

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

Real Programmers don't eat quiche. They eat Twinkies and Szechwan food.

Working...