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

 



Forgot your password?
typodupeerror
Compare cell phone plans using Wirefly's innovative plan comparison tool ×

Comment Re:Major features are complementary (Score 1) 344

I always liked assignment and comparison in the same statement. Though I understand why it'd be an anathema to some. :-D
public String getLastFour(Employee employee)
                if (employee != null)
                                if ((Address address = employee.getPrimaryAddress()) != null)
                                                if ((ZipCode zip = address.getZipCode()) != null)
                                                                if ((String lastFour = zip.getLastFour()) != null)
                                                                                return lastFour;
                throw new FMLException("Missing data");

Better yet, an if statement checks if something is true, so "if ((String lastFour = zip.getLastFour()) != null)" and "if (String lastFour = zip.getLastFour())" are equivalent. It's one of those C things that makes for delightfully compact code, but has a few pitfalls, Since if you used == instead of =, the problem with the statement might not be immediately obvious. And confusing starting/closing parentheses has been a problem in that situation, though an IDE (or even vi) helps greatly.

Of course, the biggest problem is that this example breaks Slashdot's automatic content filtering. "Try less whitespace and/or less repetition?" My original comment was fine, thank you. I had to remove all the curly brackets -- it just wouldn't let me post this until after I removed the curly brackets, no matter how much junk text I put at the end. Thanks, Slashdot.

Comment Re:Lol (Score 4, Insightful) 139

What's the difference between a city and an industrial park?

One has residents, and infrastructure for residents. The other does not.

I did not read TFA, (it's traditional), but it sounds like this mayor wants to do the following:

1) light commercial zones must not be exploited for yet more satellite office buildings, and needs to stay as strip malls, gas stations, dollar general stores, et al.

2) satellite office construction projects will have to seek different zoning from light commercial, to avoid having the problems proposal 1) seeks to address.

The headline sounds sensational-- "oh noes! Coders not welcome in Palo alto!"

I read him differently. "People actually live in Palo alto. They need to be able to buy gas and groceries without having to drive all the way to San jose. Light commercial zoning currently covers both the circle k, and pallantir's new office building. There is only so much real estate in Palo alto. Only so much of that can be light commercial. Only so much of the limited light commercial property can be office buildings, if people are going to live in Palo alto, they need light commercial that actually sells products, like a circle k does. We want to make it so new office proposals do not eliminate all other forms of light commercial, no matter how much money they have to wave around."

Comment Re:Stop with the hysteria (Score 1) 182

Isn't it a bit misleading to lump 20k+ suicides into that figure since they happened to choose a firearm to do it with?

Not at all. I'm comparing danger. As an American, you're over a thousand times more likely to die from the bullet of a gun held by an American than you are to die from anything ISIS does.

But you bring up a good point about suicide. Americans are thousands of times more likely to be a danger to themselves than they are to have ISIS be a danger to them.

So why all the fuss?

Comment Re:Could you gush a little more? (Score 1) 344

As a linux nerd I spent two decades laughing at M$'s incompetence. But I have to give credit where credit is due. I hate the fact that C# is my current favorite high-level general purpose language.

Do you still have to use that horrible Mono implementation on Linux? If we could bypass that, I might give it a look..

Comment Re:"flight proven"? hahah (Score 1) 108

Agreed. But besides the metallurgy, SpaceX accepted a bunch of challenges that nobody else wanted to do, to get as far as they have so far.

Nobody else thought fuel densification was worth it. It complicates the launch window because densified fuel has to be unloaded and cooled off if you don't launch in time, and SpaceX had a few technical hiccups to resolve when they started using it. But it gives them more fuel to work with.

We've been able to land rockets on their tail manually since the terrestrial LEM simulator (which almost killed Neil Armstrongr one day) and with computers since DC-X, but SpaceX was the first to try to recover a booster that way.

And the automated barge landing is something nobody ever tried before, but saves a ton of recovery fuel.

No doubt there are a lot of other additions to the list of firsts that were required to get a SpaceX booster recovered.

Comment Re:Vanilla is the only flavor I like (Score 1) 171

Incorrect.

As I said before, CyanogenMod and CyanogenOS are two different things. From my quick google search, what you're talking about does not apply to CyanogenMod, which is entirely open-source. The OnePlus One uses CyanogenOS.

This is like complaining about Google's telemetry in the Chromium browser (i.e., it doesn't exist, that's in Chrome).

Comment Re:heat (Score 1) 366

But it's not really about "where does the energy go." This thing is being sold as "doesn't send stuff out one end of spacecraft" and "imparts momentum."

It doesn't send mass out one end of the spacecraft, but the thing does consume energy, and quite a lot of it too from what I read. It's not a perpetual motion machine; those are allegedly able to continue operating with no energy input at all (aside from the initial amount required to achieve perpetual motion). This thing supposedly produces thrust using only energy, and no mass (ejected).

Submission + - Brain-Zapping Gadgets Need Regulation, Say Scientists and (Some) Manufacturers (ieee.org)

the_newsbeagle writes: You can now buy gadgets online that send electric current through your scalp to stimulate your brain. Why would you want to do that? Because the easy technique, called transcranial direct current stimulation (tDCS), is being investigated as a treatment for depression, a rehab aid for stroke patients, a learning enhancer for healthy people, and for many other neuropsychiatric applications.

However, the technique is so new that companies selling brain-zapping gadgets aren't bound by any regulations, and experts are worried that consumers will end up buying devices that aren't safe or simply aren't effective. So scientists and some manufacturers recently got together to discuss the scope of the problem, and what can be done about it.

Slashdot Top Deals

ASCII a stupid question, you get an EBCDIC answer.

Working...