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

 



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

Comment Re:Change Usually Isn't Easy (Score 1) 540

Ah yes, given 30 years of historical data I can make a model that predicts future stock markets and the weather as well.

Here's what's really gonna happen: The people that are already filthy rich are going to be come even richer with automated labor and we're gonna get a ruling elite and a lower class that needs to be kept under control. Except this time, this ruling elite won't be so easily displaced because they'll have a robot army, robot drones, and as many as they need... they're filthy rich after all.

It's imho the most likely outcome.

Comment Re:Spaces are the Betamax of coding. (Score 2) 391

Except those annoying tabbers don't know how to tab properly. They use them everywhere, in comments, at the end of a line, etc. See how well that lines up when you change the tab size...

Only tab for indentation at the start of a line. Never mix tabs/spaces for identation. Then it might work.

Since most people don't have the time to care about this, teams decide to use spaces so it looks uniform everywhere. It's much easier to explain how to space properly than how to tab properly.

Comment Re:Decimal Numbers? (Score 1) 427

Just introduce a class for monetary values. It can wrap BigDecimal or anything you want. Give it functions that make sense (like convert, round, add, substract, but not functions like power, sin, cos, division, etc.).

Using double is just laziness. Just because money looks like a number doesn't mean you should use a primitive type. It's like using ints where you should use enums, or storing postal code in an integer field... think about what your data represents and if the standard functions like * + - / would make sense for them. If not, use a custom class -- it will help with type safety as well.

Comment Re: Row row row your boat (Score 1) 427

If you're replacing loops with Stream's forEach, then you're doing it wrong.

Banning streams is like banning multiple returns, use of ?: operator, regular expressions, etc. Tell those old coots that work on your team to suck it up and get with the times. I'm not rewriting stuff that is clear and concise to some triple nested behemoth just to avoid something that "looks too complicated".

Comment Why can a macro even become malware? (Score 1) 129

The real issue here is that macros and scripts should always run in a very well designed and hardened sandbox. No matter what your script does, it won't be able to do more than screwing up the spreadsheet it came embedded with. It really is insane that a macro could harm your computer, except in Microsoft's world.

The culprit is simply bad design. Nobody in their right mind would allow arbitrary scripts from unknown sources to be run freely in an environment where they can affect things outside that environment.

Slashdot Top Deals

In a consumer society there are inevitably two kinds of slaves: the prisoners of addiction and the prisoners of envy.

Working...