Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×

Comment Re:Hell No! (Score 1) 1067

Come to think of it though, if you are working in uint space (that is, unsigned ints), than you *can't* have approached from below zero.

And if you were for some reason working with unsigned ints that were always multiplied by -1 than I think you'd still be ok with -1 * inf as your result.

Just so we're clear: this is stupidity -- the algorithm is not returning useful data and it will only mess up everything down the line. Sanitize before you divide, handle divide by zero as an error or a special case.

Comment Re:I'm tired, too (Score 1) 1067

if(x1!=x2)
{
slope = (y2-y1) / (x2-x1);
}

If x1 == x2, you probably don't actually *need* a slope. You can mark those shapes or lines as perfectly vertical. Any algorithms that process based on slope would just skip those lines. A simple bool array that accepted pixel or shape (not really sure of the application) coordinates could return several useful parameters that would keep other algorithms from tripping up.

You might think this is a lot of overhead, but passing uint(-1) to an algorithm needlessly, or rotating your entire scene to avoid this is also a lot of overhead. If you just make a single pass over the scene and store the parameters (remember, memory is plentiful these days compared with CPU), then you can do very simple logic on the processing side, re-using the stored results.

You can fix the math by fixing the algorithm, no need to return results when the results are not only undefined but also not useful.

Comment Finally! (Score 0) 105

I have been suffering browsing the web with only one audio channel per ear for literally decades.

What to them so long, this is embarrassing. When I go to the movies I get to smell expensive popcorn and experience 6 to 16 channels of high-def audio. Why not on my windows smart phone and my tablet?

Comment Wrong (Score 4, Insightful) 327

PowerPoint is not the crutch. The crutch is pointless meetings and the desire for "material" when what you really need is a discussion with the right key people in the room.

Might as well ban PDFs while we're at it, I've seen lots of pointless PDF files too.

Comment Re:Be Careful What You Wish For (Score 1) 631

You might be right that this is a loaded Trojan horse.

However, I have no problem with what is on the surface. These are good ideas -- the internet is very much deserving "public utility" status. I'm not worried about fast lanes, I'm worried about intentionally making competition-owned services slower. The internet is a freaking power outlet, it should not matter what brand of hair dryer I plug in. If I need more power, I buy more power (bandwidth). But it doesn't matter what I am using it for.

The thing is we're worried about what comcast "might" do. And you're worried about what the NSA/government "might" do. Well maybe we're both right, did that ever occur to you? Maybe the government wants to overreach, to spy on your ebay shopping and snoop on your email. Maybe private industry wants insert extra ads while I web surf, or slow down Skype so that I am more likely to use iMessage, or make Amazon faster than Netflix in return for a little cash on the side. or whatever. Lots of maybe here.

We have to attack on both fronts. Neither party is trustworthy here.

Comment Re:Yep it is a scam (Score 1) 667

I'd say they are as qualified as the democrats. The democrats are convinced and will vote for anything related to it. The republicans are convinced the other way. Neither party is being particularly scientific about this or any other political issues. And yes, this is only politics. Climate science deserves a lot more than a binary vote.

There are no significant differences in the senators between the two parties. They both wine and dine together, both came from big old-school money, went to Harvard, etc. Mostly law degrees. What did you think, the democrats were all scientists and the republicans all oil surveyors?

Grow up, take the blindfold off. You have been pulled into drinking the party's punch. Stop before it's too late.

Comment Re:design flaw with placement of antenna (Score 1) 130

What would be great is if MRO could try and make contact on its next fly-by. That antenna would certainly work under a solar panel, it would just have considerably less range. But knowing where it is now, we should be able to jam a signal down the front end and make contact.

If the solar chargers are still functioning with 2/3rds of the design power...

Comment FreeBSD (Score 1) 403

Without a doubt, FreeBSD is the best at these tasks. I have used it in the past and you can create a basic forwarding firewall with only a few lines of config. Add a dozen or so more for better control. I also ran BIND, isc-dhcpd, and a wifi access point. This would be a little tough under OpenBSD and NetBSD as they don't have quite the same range of wifi hardware supported out of the box.

FreeBSD has good package management and is very well documented. In many benchmarks, it is faster and scales better than the other BSDs. SAMBA will work fine, as will netatalk and NFS.

Having said all this, running your own firewall is a really good skill and enjoyable hobby. But if it ever becomes more of a burden than an enjoyable task, switch to a high-performance router running linux (no routers with linux have stooped to systemd yet that I know of). I have an ASUS that can seriously handle all the throughput that I can throw at it. And now I have more time for other things!

PS: If you're not already aware, in addition to local caching, BIND can also connect to DHCPD and create real DNS resolution for your local clients.

Comment Either way (Score 1) 448

Good or bad, it's going to happen.

In the future, it will look completely stupid that people would pay for 200 channels of which they can only watch one at a time. And, they had to watch at the behest of Hollywood TV programming schedules, or get sophisticated personal video recorders to schedule recording (even more silly when you realize most TV is already recorded -- not live).

The model of watching TV channels is on its way out. The only way for cable companies to get some "cord cutters" back is to offer them only what they want, say a sports or news channel. And this will only prolong the inevitable.

No doubt cable companies would not just sit on their hands and let people scale back their bills and channel selections. Duh. But the writing is on the wall, and their days are numbered.

I just ordered a new internet service through a different cable provider, and I had to tell the poor gal that I don't have a TV to get her to stop offering bundled x y and z.

Comment Re:Choices. (Score 1) 416

But here's the thing, is telling a student that she has now lost her "physics virginity" (a common expression he used) harassment? Is this his "sex life"?

You have jumped to the conclusion that what he did must be horrible without knowing what he did. We (the public) don't even know the context other than that a female student complained about an email and he was fired.

I agree with your points, but I think you should consider that he may not have had a non-exemplary "sex life". He might have just been a grumpy old guy using phrases that a modern PC crowd can't handle.

Just consider it.

Slashdot Top Deals

Adding features does not necessarily increase functionality -- it just makes the manuals thicker.

Working...