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

 



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

Comment Re:Theory vs. Practice (Score 1) 385

I tend to prefer aligned braces (e.g. following-line so that it matches the closing brace).

It seems that lately programming courses are teaching the "following the function-definition" version.

I'll admit that I sometimes do a hybrid. Inline for the function definition, next-line for any operators etc

sub foo(){
    if ( $bob == 1 )
    {
            #do something
    }
}

Comment Built-in-batteries... that'll cost 'em (Score 2) 177

If the batteries weren't embedded, then they wouldn't need a recall of the whole phone (assuming the issue is the battery itself and not some part of the charging system).

All they would need to do is recall the battery and have users bring them in to swap for a good battery. As a bonus that's a *lot* less of a pain-in-the-a** for users who will now need to migrate all their data to a new device, or be out a phone in the interum.

Comment Re:Theory vs. Practice (Score 1) 385

That's funny, because I've tended to see that as the opposite in most cases (not saying it's better, just the coding-style I've seen and it seems fairly clean), e.g.

sub foo
{
    $var = 22;
    $anothervar = 23;
    if ( $var == $anothervar )
    {
        return $var1;
    }
}

Comment Re:Theory vs. Practice (Score 1) 385

I've used a couple editors which pretty much represent a tab as a certain number of spaces at the line beginning, but as a tab later in the line. It looks *beautiful* in the editor.

Then I opened it in vim, and discovered that it was still inserting actual tabs but just visually formatting them to look nice and uniform. I'm pretty sure people wonder why my code looks like ass.

I do like the idea of space-from-the-left, tab-on-the-right though

e.g. spaces for function/comparison/loop/etc indents, tabs for things like lining up variable definition as

function somefunct {
    $bob = 1;
    $sam = 2;
}

p.s. Next coding holy-war, brackets in the function definition or the following line?

Comment Satellite phone (Score 1) 197

And if somebody buys a Satellite phone and then turns out to be an ISIS member, who then speaks in code so he's not detected, do you then go after the phone provider?

You want info, get a warrant. But the fact that the service exist doesn't mean it does so for the purpose of servicing a terrorist organization.

Slashdot Top Deals

"Be there. Aloha." -- Steve McGarret, _Hawaii Five-Oh_

Working...