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: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.

Comment Re:No speed limits as well... (Score 2) 602

It amuses me that people think that crippling infrastructure is the way to increase safety. I'd say it's bloody obvious because the correlation is less speed = more safety.

So the next step is to replace those roads with cobblestones... I'm sure people will slow down and accidents will decrease even further.

The real innovation will be when you can drive safer and faster at the same time. Lines help with that, as do wider roads.

Slashdot Top Deals

Do molecular biologists wear designer genes?