Follow Slashdot blog updates by subscribing to our blog RSS feed


Forgot your password?
Check out the new SourceForge HTML5 internet speed test! No Flash necessary and runs on all devices. ×

Comment Re:Curly braces = good. Indents = bad. (Score 1) 173

I don't know about everyone else, but I find it *immensely* helpful to write debugging statements without indentation. This makes it so that they stand out from the normal statements among which the debugging statements are inserted. This is the reason I won't even consider using Python.

Just stick "# XXX" comments around your debug code. Many editors automatically highlight XXX so prominently that it's just as easy to spot as unindented code.

Now, all you Python-indentation-style lovers, consider how you would code this kind of Go initializer:
        arr := [][]int{{1,2,3},{4,5,6}}
(This declares the variable 'arr' as a slice of slices of ints and initializes the variable.)

You mean, like:
arr = [[1,2,3][4,5,6]]
What's the problem?

Comment Re:Other than Brother... (Score 4, Insightful) 387

About 5 years ago, my Brother laser printer said it was low, so I taped over the window. A couple of years later, I did get off my lazy ass and ordered a new cartridge so that I wouldn't interrupt my workflow. However, the original cartridge that came with the printer still hasn't run out. I have no idea when and if I'll ever need to install the new cartridge.

As you can guess, I don't do very much printing. However, the "low toner" light probably started blinking after printing only about 1/4 of the total number of pages I've gotten out of it so far.

This whole episode does reinforce the decision I made before buying the laser printer: I will never, ever buy another inkjet printer as long as I live. Those cartridges seem to dry up, clog and die even if I don't use them. I got sick of spending $30 on a set of cartridges, only to get a hundred pages out of them before they became useless from age. At least laser printer toner seems to have an almost unlimited lifespan.

Comment Re:cable is not over the air waves (Score 1) 149

If a cable company puts some wire down, they ought to be able to do whatever they want with it as it does not interfere with other devices.

Before we implement your corporate utopia, first we need to rescind all property easements.

Then the cable companies can negotiate with each individual land owner to determine an appropriate agreed rental fee for allowing those wires in each parcel of property. If they can't come to an agreement with any particular owner, they can make deals with other land owners and re-route their cables.

Once all of that is complete, then they can completely deregulate cable.

Comment Re:Decimal Numbers? (Score 1) 427

Accountants always go for arbitrary precision with accuracy settings twice as far out as precision and decimals only ever actually evaluated when they are to be presented to a human.

There's the whole problem with your smug position.

Accountants typically represent intermediate results to humans at many points in their algorithms. At each of these steps they make gross roundoff errors, but they make sure that all of the rounded off numbers add up neatly at the end. All of your vaunted precision and lazy evaluation has just been made irrelevant.

Accountants shrug it off and declare it to be the correct answer, when in many cases appropriately designed algorithms using plain floating point would have come out closer to the actual truth.

Comment Re:Decimal Numbers? (Score 1) 427

My point is that many programmers of financial applications build gross errors into every single step of their algorithms, rounding off each intermediate result to an even decimal to make the results look pretty.

Then they pat themselves on the back and say how the decimal types helped them represent the results "exactly", when in fact it was a case of "garbage in, garbage out".

It's true that most so-called developers know the principles behind neither numerical algorithms nor data types. That doesn't excuse smugness on the part of people who only know the latter, and who think that big decimal data types are somehow inherently superior to any other numerical representation.

Comment Re:Decimal Numbers? (Score 1) 427

To avoid getting errors in the magnitude of 1e-15 on these inputs (which they could often entirely avoid anyway by working in cents), they instead happily round intermediate results to quantized values with errors typically in the range of 1e-2 to 1e-9 over and over again.

As the saying goes: "Accountants know the cost of everything and the value of nothing".

Comment Re:Decimal Numbers? (Score 1) 427

You'd like to split $10 exactly by 3. You think that you can't because you're using a decimal representation. You could if you were using duodecimal or any other base containing a factor of three. (It would be exactly $3.4 in duodecimal.)

Accountants would inaccurately divide the quantity into unequal amounts of $3.33, $3.33 and $3.34 decimal, and then call that "correct". Scientists would divide it into three payments of $3.333333333333333, and disregard the insignificant error. Which is closer to the ideal? I would argue the latter.

Accountants are used to adding gross errors at every step of their algorithms just so the results look neater. (Government accountants even encourage you to round every intermediate value of your tax returns to a whole dollar. Such sloppiness would be laughed at in scientific computing.) You're just so used to these errors that you've come to expect them.

Slashdot Top Deals

Multics is security spelled sideways.