Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror

Comment Re:I want my division by zero errors to be errors (Score 4, Interesting) 1067 1067

I agree here. One easy example is computing an average: add up the numbers and divide by N. What if you have no numbers to average and N == 0? That doesn't mean the average is zero, it means you don't have an average. You always have to check for /0 errors, not because you want to keep the program from crashing but because you need to handle all the special cases. It's usually (not always) better to crash to alert you to an un-handled condition than to pretend nothing is wrong.

Should all null pointer exceptions or segfaults be handled quietly in some arbitrary way, in order to make software more "robust?"

Comment Re:Meh (Score 1) 830 830

Nah, the power output tells you if it can support the water heater's current draw while running, but not how much water you can heat. He needed to know the total energy stored in the batteries and the size of the water heater to estimate how many gallons of hot water could be heated and used for the weekend. They were big batteries, and it was enough for some 20 gallons of water or so.

Comment Re:Meh (Score 1) 830 830

There's a grey area here. Celsius is much more nearly metric than Fahrenheit. Most of the time in the engineering world when you're using temperature in calculations it's temperature differences that are important, and for that Celsius is just fine while Fahrenheit is a pain in ... well you first convert to Celsius. Doing thermal calculations entirely in the US customary system is trickier and generally not even taught. A friend was recently going to a vacation home and asked me for help working out the problem of how many gallons of water could be heated by a battery-powered generator operating a water heater. Do you start by converting gallons and Fahrenheit into kg and Celcius, or do you work the other direction and convert Volt-Amperes into Btu/h? That's a rhetorical question.

If you're working in a more academic field than you'll use whatever temperature units are convenient for your purposes. You can't say "... Rankine is better than ..." without being very specific about the area of study.

Similar arguments apply to other kinds of units when thinking about the US "going metric." There isn't only one way to do it, and it doesn't have to be an all-in or all-at-once thing. Considering all of the machine shops and the like, a realistic transition will take decades before we get mostly there. It starts with little things like posting speed limits in Kph (as well as Mph) and selling milk in liters (gallons also labeled). For most units like distance and mass/weight, metric is no more or less "natural" than the US customary system. You do have a merited argument with Fahrenheit vs Celsius, but it's a weak one and lots of folks have become accustomed to C.

If we were ever to make this transition, it might help a tiny bit to de-mystify science. Even just to internalize concepts like force (weight) versus mass. You can't convert pounds to kilograms without assuming some value of g. Pounds convert directly to Newtons, and kilograms convert to slugs.

But on the other hand, if we ever started making metric screw sizes, as one example, then a lot more globalization may start to kick in which is not necessarily a good thing. Maybe it would be, but it's hard to predict accurately. We historically lose manufacturing jobs. Is it advantageous for us to be out of sync with the rest of civilization?

Comment Re:faster than light never violates Relativity (Score 1) 226 226

I think you've stated the main argument about stuff moving faster than c. But more abstractly, consider two events that are separated in both space and time, A and B. Let's say A happens first and "causes" B. Maybe A is "someone throws a ball" and B is "someone catches it." Or perhaps A and B could be sending and receiving a communication. In any case if B is outside of the light cone of A, meaning that light or anything slower could not travel from event A to event B, then there is a reference frame in which events A and B happen at the same place. But when you "boost" into this frame of reference, you'll find that B happens before A. Faster-than-light communication implies that effect can precede cause. Maybe that could be true, but regardless that's what we're up against. Part of this is a conceptual difficulty: the nature of space-time is slightly more complex than our intuition allows for. A better intuition might involve a different definition of "now" that is dependent on where you are in space. Your "now" is a little behind mine, and vice-versa. Or something like that.

Comment Re:Is a reduction (Score 1) 89 89

Thanks for this explanation. I was wondering earlier that if the problem was only as bad as "decimation", had scientists considered the various unintended consequences of this treatment? But seeing that the disease is likely anthropogenic, and that it is really wiping out entire populations, it sounds like this treatment can only be a Good Thing.

Comment Re:So let me get this straight (Score 1) 686 686

The claims that Snowden attempted to use the proper channels are disputed by the NSA. I think it's extremely likely that Snowden's version of the story is closer to the truth, but I have to keep in mind that there's some uncertainty there. The outcomes of the leaks are harder to dispute, and I think the net effect was a positive outcome.

And I still recall Obama's speeches that change had to come to Washington, not from it. Heh. But did he live up to his campaign promises any less or any more than other presidents have? I guess good presidents need to work with compromise and internal politics well while in office. I think Nixon was pretty good by that measure.

Comment Re:Lift the gag order first... (Score 1) 550 550

I think Comcast and others like them argue that our thought-model of the internet is too simplistic. It's not the case that if Netflix just buys more bandwidth, all content consumers benefit. Comcast says that they want Netflix to pay for them to add additional infrastructure so that their bandwidth-intensive traffic is handled on new routes that are more direct for various residential areas.

But your arguments are also correct, that by Comcast charging Netflix an additional fee for this infrastructure (or worse, for the right not to be throttled), they are creating an unfair means of passing costs onto customers and perhaps also being anti-competetive with respect to other residential ISPs. In some ways Comcast wants to be free to use extortion (pay us to not throttle your traffic), but in other ways there is real potential for building out better internet service.

I think the trick is finding a fairer means of economically building out the kind of infrastructure that best delivers content to the consumers. I suppose it would be fair if Comcast added the extra infrastructure for those companies like Netflix that consumers are pulling heavy traffic from, and then being honest and public about this -- using it as a selling point to differentiate them from their competition. This should lead to a higher demand for their service, which should lead to them justifying the capital investment.

The "stifle innovation and restrict freedom" argument is very typical GOP BS. They feel like less regulation is a panacea and are blind to anti-competitive tactics and the kinds of regulations that would keep a free market both free and efficient.

Comment Re:What is systemd exactly? (Score 1) 765 765

The problem is that a lot of the behind-the-scenes tinkering and established-over-decades code in scripts is going out of the window and one huge set of binaries are trying to replace it WHILE also stepping in to replace an awful lot of other pseudo-related systems. Systemd is tying into everything from initial boot to how to configure your soundcard.

Those established-over-decades init scripts are fragile and difficult to maintain. My observation is that this is what drives system developers to push for systemd. Well, this and the order of startup, dependencies, etc.

Maybe we need a fork of systemd that takes some of the more common complaints seriously enough to do something about them. I see limitations of plain-text logging systems, but can't these be addressed with a text-based, human-readable log that uses some kind of mark-up for timestamps, PIDs, etc? While there may be some small efficiency gains by incorporating more services into systemd like networkd and such, we could set a higher bar for module inclusion -- there has to be an overwhelming argument for tight integration. And so on.

Comment Re:Strange (Score 1) 80 80

I wonder how this is different from channel bonding / link aggregation? I looked into this a few months ago and don't remember all the details but there's a "bonding" kernel module, which can run in some modes entirely in kernel space, or in a user-space-assisted mode. There is a round-robin mode but there are several others that include fault tolerance and load balancing. LACP can be used in cooperation with other network elements including switches if you want something that spans a local network.

I had limited success with this myself, so I wonder what new technology the Fault Tolerant Router brings?

Comment Re:Parody (Score 1) 255 255

I doesn't sound to me like it's specific enough in its references to be primarily a satire or parody. IMO If it isn't obviously and specifically satirical, then Kahn should have obtained permission before publishing. Failing that, leave the power rangers tie in an unwritten one that's strongly hinted at. A fair use(?) Austin Powers clip: "It looks like Godzilla, but due to international copyright laws - it's not."

Comment Re:Parody (Score 2) 255 255

So it's a parody of the response that it would evoke by being an arguably infringing work? That's prescient! If this were actually enough to prove that it's non-infringing (it's not IMO) then maybe the parody fails and then makes the short infringing again on the original grounds, which ...

Sorry I tried to make a temporal paradox out of it. Best I could do.

Comment Re:c++? (Score 1) 407 407

But don't forget the context. It isn't "I want to write a program that splits a string on commas," but "I want to write a program that will grow in complexity." Like most programmers, I read a whole lot more code than I write. I like to read code that is expressive enough that the little things (like string splitting) are simple statements while the over-arching objectives and design issues are stated in comments. Also anything that's subtle should be commented, but not "// This splits a string. Check my work please!" Or "// Opening a TCP socket," etc.

C++ allows you to write very clever code, which is admittedly fun to do. But it's wearisome to read that stuff because you have to both figure out what it's doing and also prove to yourself that it's correct and handles malformed data properly. Unless you're optimizing some crucial piece of code (which C++ is potentially good for), it's much better to write expressive code.

I haven't done too much with QT, but I think it is well structured and helps you to learn to write good C++. Some will say that's an oxymoron. But I've seen what can only be judged bad C++, and know that QT could have been a whole lot worse than it is.

Library dependencies -- that's another subject. You're going to have them one way or another. Picking your libraries well is a matter of taste and what you're long-term plans are.

Comment Re:who uses stock os? (Score 1) 144 144

I'm not sure what models you're referring to. My last three or four laptops have been Lenovos, and I never experienced any roadblocks installing Linux on them. I think the BIOS on at least one of these supported a whole-disk encryption but that doesn't even try to prevent you from reformatting and installing an OS.

My vague understanding is that Superfish is Windows software, not part of BIOS or the Windows bootloader, and certainly not grub. You can also apparently uninstall superfish: http://www.cnet.com/how-to/len...

My current model is a T440, which is fine except for the tragicomical touchpad. It's by far the worst touchpad I've ever, well, touched. I keep a wireless mouse with me at all times because that pad is nearly useless. Previous models were good.

Comment How about a partial-representative democracy? (Score 1) 480 480

This got me to thinking: if we can invent a "good enough" electronic voting system, and in an age where communication is cheap and easy, why not go farther and consider a democratic system where every citizen is allowed to vote on any issue directly, if they choose, or a person could elect their own personal representative. So there would still be room for professional politicians. But some people would prefer to read blogs containing oppinions on issues, or decide on a per-issue basis to cast their vote independently from their chosen representative. Representatives would probably have a maximum limit of representees to avoid over-concentration of personal power. Political parties would either have no legal support or might even be legislated against. I don't know, I'm just thinking out loud so to speak.

For me, the two biggest problems with US politics are (1) lobbying and campaign finances and (2) the effectiveness of propaganda. The power of lobbying would be weaker if citizens retained their right to vote directly and independently on any issue they choose to. That would also encourage legislators to blog about what they are supporting and why. This might help them gain representees as well as swinging independent votes. The effectiveness of propaganda is a much tougher issue to deal with, but I believe that disrupting a two-party system would help, as would the teaching of propaganda analysis as part of the standard curriculum at the high school level. Hopefully others have better ideas.

And before you say "That'll never happen!" let me agree on that point but then refuse to let that stop me from dreaming. In modern times, what would a more effective democracy look like? The foundation of democracy is that people are intelligent and capable of self-government. Is that even a valid principle? If so, how could we implement it better?

You are in a maze of little twisting passages, all different.

Working...