Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
prefect
Sep 11, 2001

No one, Woodhouse.
No one.




Dead Man’s Band
i did find a post on these here forums including code that would have allowed me to map a drive without shelling out, but i found it a bit disturbing

http://forums.somethingawful.com/showthread.php?threadid=2262300&pagenumber=13&perpage=40#post324849558

Adbot
ADBOT LOVES YOU

CamH
Apr 11, 2008

prefect posted:

if you don't have anything that makes you feel happy/accomplished, you can pass the time before death with video games and recreational chemicals

i like weed

FamDav
Mar 29, 2008
i ski in winter
and go to concerts a lot
you broken people

Nomnom Cookie
Aug 30, 2009



i post on yospos and pray for death (yours)

Hellsworn Barn
Apr 11, 2008

hi

OBAMA BIN LinkedIn posted:

when a trivial error can kill your program then you should drat well have to make sure that is what you intended

checked exceptions don't solve this problem they make it worse.

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
what is a checked exception and why do you idiots care

Hellsworn Barn
Apr 11, 2008

hi
Checked exceptions, won't compile without the throws clause:
code:
public void SomeMethod() throws SomeException
{
	SomeMethodThatThrowsAnException();
}
Unchecked exceptions, compiles just fine:
code:
public void SomeMethod()
{
	SomeMethodThatThrowsAnException();
}
What you ultimately end up with if you have checked exceptions:
code:
public void SomeMethod() throws SomeException, SomeOtherException, ListEveryExceptionThatCouldPossiblyBeThrownByCalledMethod
{
	SomeMethodThatThrowsAnException();
}

JewKiller 3000
Nov 28, 2006

by Lowtax

Hellsworn Barn posted:

What you ultimately end up with if you have checked exceptions:
code:
public void SomeMethod() throws SuperclassOfEveryExceptionInTheLanguage
{
	SomeMethodThatThrowsAnException();
}

ftfy

Socracheese
Oct 20, 2008

code is computer talk

Bloody
Mar 3, 2013

code is words that computers can read

echinopsis
Apr 13, 2004

by Fluffdaddy
I'm sitting at work getting excited about the prospect of coding when I get home from work


kill me

uG
Apr 23, 2003

by Ralp

Bloody posted:

code is words that computers can read
no code is words a compiler can read no wonder ur in this thread

Bloody
Mar 3, 2013

uG posted:

no code is words a compiler can read no wonder ur in this thread

this thread is my home

did i mention i write java and c

i belong here

Hellsworn Barn
Apr 11, 2008

hi

or even better
code:
public void SomeMethod()
{
	try {
		EveryMethodYourProgramCallsThatThrowsACheckedException();
	} catch (Exception e) {
		throw new RuntimeException(e);
	}
}

Bloody
Mar 3, 2013

please don't post my closed-source software code

computer toucher
Jan 8, 2012

Seems like I made the right choice when I chose a career path that involves no programming at all.

Shaggar
Apr 26, 2006

Hellsworn Barn posted:

or even better
code:
public void SomeMethod()
{
	try {
		EveryMethodYourProgramCallsThatThrowsACheckedException();
	} catch (Exception e) {
		throw new RuntimeException(e);
	}
}

well yes if you're a terrible developer that happens, sure. but if you cant properly deal w/ checked exceptions ur a huge idiot.

Mr SuperAwesome
Apr 6, 2011

im from the bad post police, and i'm afraid i have bad news

Hellsworn Barn posted:

or even better
code:
public void SomeMethod()
{
	try {
		EveryMethodYourProgramCallsThatThrowsACheckedException();
	} catch (Exception e) {
		throw new RuntimeException(e);
	}
}

your braces are hosed yo

Doc Block
Apr 15, 2003
Fun Shoe
That is the One True Brace Style. Functions & methods get the opening brace on a separate line. if/else, for loops, etc., get the opening brace on the same line. The closing brace always goes on a separate line.

Shaggar
Apr 26, 2006
yes the one truly bad brace style

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord
reading this thread because I'm way behind the other one

hello there present yospos I'm going back to the past now

duTrieux.
Oct 9, 2003

Symbolic Butt posted:

reading this thread because I'm way behind the other one

hello there present yospos I'm going back to the past now

WARN THEM

TELL THEM WHAT HAPPENS, drat YOU

Doc Block
Apr 15, 2003
Fun Shoe

Shaggar posted:

yes the one truly bad brace style

And what, pray tell, is the Shaggar-approved brace style?

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
code:
{  * } { *  } 


     
 
    {()}

CamH
Apr 11, 2008

yo opening braces always go on the line w/ other poo poo

closing braces get they own line

echinopsis
Apr 13, 2004

by Fluffdaddy
braces? more like gay-ces

Doc Block
Apr 15, 2003
Fun Shoe
lol you would know

Nomnom Cookie
Aug 30, 2009



Doc Block posted:

And what, pray tell, is the Shaggar-approved brace style?

my shaggier.xls has allman on it. if thats the one where opening braces always go on the same line then hes right

coaxmetal
Oct 21, 2010

I flamed me own dad
why do we have 3 programming threads now can't we keep this all in one place. I don't want to read 3 whole threads.

Doc Block
Apr 15, 2003
Fun Shoe

Nomnom Cookie posted:

my shaggier.xls has allman on it. if thats the one where opening braces always go on the same line then hes right

allman style is this dumbass poo poo
code:
if (yourmom == laffo)
{
    gb2gbs();
}
else
{
    yospos_bitch();
}
real men use the K&R One True Brace Style
code:
int main(int argc, char *argv[])
{
    if(yourmom == laffo) {
        gb2gbs();
    } else {
        yospos_bitch();
    }

    return 0;
}

coaxmetal
Oct 21, 2010

I flamed me own dad
what if you had a language that didn't need braces as delimiters so you got readability and standardization for free without having to argue about curly brace style. That would be neat.
Also K&R is better than allman, why do you need 3 lines to have the word "else". Please sandwich your elses.

Plastic Snake
Mar 2, 2005
For Halloween or scaring people.
allman style is for c#

double sulk
Jul 2, 2010

code:
- (void)function withArgument:argument
{
	if (expr) {
		result;
	}
}

Bloody
Mar 3, 2013

Ronald Raiden posted:

what if you had a language that didn't need braces as delimiters so you got readability and standardization for free without having to argue about curly brace style. That would be neat.
Also K&R is better than allman, why do you need 3 lines to have the word "else". Please sandwich your elses.

how wide are your tabs
do you prefer spaces or true tabs

coaxmetal
Oct 21, 2010

I flamed me own dad

Bloody posted:

how wide are your tabs
do you prefer spaces or true tabs

Good point, we can never win. Also 4, spaces. At least it's more readable than braves, in any case.

MononcQc
May 29, 2007

Ronald Raiden posted:

why do we have 3 programming threads now can't we keep this all in one place. I don't want to read 3 whole threads.

I guess we can do this the day there just one phone thread.

coaxmetal
Oct 21, 2010

I flamed me own dad

MononcQc posted:

I guess we can do this the day there just one phone thread.

Well having multiple phone threads is fine because I don't care about phones so I just don't read any of them

Juul-Whip
Mar 10, 2008

Plastic Snake posted:

allman style is for c#

last summer I worked at a C# shop which swears by K&R style. but nobody could figure out how to stop ReSharper autocorrecting to Allman style. So every time I checked in code I had to K&R-ize it first

Tiny Bug Child
Sep 11, 2004

Avoid Symmetry, Allow Complexity, Introduce Terror

Ronald Raiden posted:

what if you had a language that didn't need braces as delimiters so you got readability and standardization for free without having to argue about curly brace style. That would be neat.

you'd have a completely poo poo language is what you'd have

Adbot
ADBOT LOVES YOU

echinopsis
Apr 13, 2004

by Fluffdaddy
pretty sure basic doesn't need braces OR indents

  • Locked thread