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
DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

amazing

Adbot
ADBOT LOVES YOU

BattleMaster
Aug 14, 2000

wait is there something wrong with return arg < 0

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

Illusive gently caress Man posted:

i live in brooklyn, which is probably cheaper than sf. I live with roommates but a decent 1 bedroom is definitely affordable on this salary.

lol. you're gonna be really disappointed if you want to live in the city

gonadic io
Feb 16, 2011

>>=

BattleMaster posted:

wait is there something wrong with return arg < 0

no, it's that the brace is on the wrong line

Notorious b.s.d.
Jan 25, 2003

by Reene

MALE SHOEGAZE posted:

lol. you're gonna be really disappointed if you want to live in the city

brooklyn isn't any cheaper than the city now

Bloody
Mar 3, 2013

gonadic io posted:

no, it's that the brace is on the wrong line

no, it's that the function is incorrectly named for appropriate c style

Bloody
Mar 3, 2013

MeruFM posted:

is that from the movie?

no.

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

gonadic io posted:

no, it's that the brace is on the wrong line

no, the problem is that it's a predicate with no ?

bobbilljim
May 29, 2013

this christmas feels like the very first christmas to me
:shittydog::shittydog::shittydog:
the problem is that the printf could overflow the array

gonadic io
Feb 16, 2011

>>=

BattleMaster posted:

wait is there something wrong with return arg < 0

also as if anybody would write an isNegative function in tyol 2015,just use a lambda function if you're working in a crippled language that doesn't have partially applied functions.

Soricidus
Oct 21, 2010
freedom-hating statist shill
i'm the malloc

wish y'all would be the free

BattleMaster
Aug 14, 2000

I never even looked at it very closely; god drat it's an onion of terribleness with layers upon layers

triple sulk
Sep 17, 2014




nothin wrong w/this imo.

bobbilljim
May 29, 2013

this christmas feels like the very first christmas to me
:shittydog::shittydog::shittydog:

triple sulk posted:

nothin wrong w/this imo.

:negative:

echinopsis
Apr 13, 2004

by Fluffdaddy
as long as it compiles

sarehu
Apr 20, 2007

(call/cc call/cc)

triple sulk posted:

nothin wrong w/this imo.

But it's a JPEG.

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord
wait I know how to make it better

code:
static int isNegative(float arg)
{
        char *p = (char*) malloc(20);
        sprintf(p, "%f", arg);
        return(p[0] == '-');
}

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

Symbolic Butt posted:

wait I know how to make it better

code:

static int isNegative(float arg)
{
        char *p = (char*) malloc(20);
        sprintf(p, "%f", arg);
        return(p[0] == '-');
}

haven't you read the coding standards? follow the naming scheme, always check your return values, don't use magic numbers, and be sure to use const

code:

static int number_isNgve(float arg)
{
#define MAX_NEG 20 * sizeof(unsigned char)
        const char* p = (char*)malloc(MAX_NEG);
        if (sprintf(p, "%f", arg)) 
            return(p[0] == '-');
        else {
          errno = ENOTSUP;
          return -1;
        }
}
[/quote]

gonadic io
Feb 16, 2011

>>=
Somebody just paste enterprise fizz buzz here and get it over with

MeruFM
Jul 27, 2010

gonadic io posted:

Somebody just paste enterprise fizz buzz here and get it over with

searched it up

was hoping for fizz and buzz factories

disappointment
oh wait, i didn't go deep enough

this delights me highly

coffeetable
Feb 5, 2006

TELL ME AGAIN HOW GREAT BRITAIN WOULD BE IF IT WAS RULED BY THE MERCILESS JACKBOOT OF PRINCE CHARLES

YES I DO TALK TO PLANTS ACTUALLY

Illusive gently caress Man posted:

and a thorougly deece six point five
does this mean your salary is ~$300k or are 'figgies' not logarithmic

coffeetable fucked around with this message at 07:44 on Sep 9, 2015

Triglav
Jun 2, 2007

IT IS HARAAM TO SEND SMILEY FACES THROUGH THE INTERNET
150,000

coffeetable
Feb 5, 2006

TELL ME AGAIN HOW GREAT BRITAIN WOULD BE IF IT WAS RULED BY THE MERCILESS JACKBOOT OF PRINCE CHARLES

YES I DO TALK TO PLANTS ACTUALLY
six point one seven figures

Soricidus
Oct 21, 2010
freedom-hating statist shill
I choose to assume that six point five means $6.50/hr

DaTroof
Nov 16, 2000

CC LIMERICK CONTEST GRAND CHAMPION
There once was a poster named Troof
Who was getting quite long in the toof

Soricidus posted:

I choose to assume that six point five means $6.50/hr

a deece six fitty

Kilroy
Oct 1, 2000

MeruFM posted:

searched it up

was hoping for fizz and buzz factories

disappointment
oh wait, i didn't go deep enough

this delights me highly
I interviewed someone who wrote several functions and two classes to implement FizzBuzz. I would have stopped him but morbid curiosity kept me in check. We ended up hiring him.

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord

Kilroy posted:

I interviewed someone who wrote several functions and two classes to implement FizzBuzz. I would have stopped him but morbid curiosity kept me in check. We ended up hiring him.

that sounds fair for an entry job

Bloody
Mar 3, 2013

tbh I would hire anyone who knew what a class was at this point

JewKiller 3000
Nov 28, 2006

by Lowtax
keep going you guys are making me feel better about my job search

echinopsis
Apr 13, 2004

by Fluffdaddy

Bloody posted:

tbh I would hire anyone who knew what a class was at this point

thats me mate. thats the level youre looking at

bobbilljim
May 29, 2013

this christmas feels like the very first christmas to me
:shittydog::shittydog::shittydog:

echinopsis posted:

thats me mate. thats the level youre looking at

your better than a lot of devs I've worked with

echinopsis
Apr 13, 2004

by Fluffdaddy
and why not too

gonadic io
Feb 16, 2011

>>=
Field name: Active
Description: whether or not the account is active. T = true, F = false
Format: text(1)
Example: "yes"

Thanks specification. Thacification.

AWWNAW
Dec 30, 2008

Kilroy posted:

I interviewed someone who wrote several functions and two classes to implement FizzBuzz. I would have stopped him but morbid curiosity kept me in check. We ended up hiring him.

I hired a guy that did fizz buzz just fine and he ended up being a completely poo poo programmer. It was then I realized that I was the completely poo poo programmer for thinking fizz buzz was a good measure of programming ability.

Bloody
Mar 3, 2013

did you know? fizzbuzz is literally the lowest possible bar you can set for programming aptitude

nontechnical women and children can probably fizz a buzz

jony ive aces
Jun 14, 2012

designer of the lomarf car


Buglord
i literally could've fizzbuzzed with no extra coaching when i was like 6 or something

it would've been in qbasic but still

qntm
Jun 17, 2009

Kilroy posted:

I interviewed someone who wrote several functions and two classes to implement FizzBuzz. I would have stopped him but morbid curiosity kept me in check. We ended up hiring him.

A while back I saw a person coding up Conway's Game of Life using a Cell class with two subclasses, LiveCell and DeadCell.

coffeetable
Feb 5, 2006

TELL ME AGAIN HOW GREAT BRITAIN WOULD BE IF IT WAS RULED BY THE MERCILESS JACKBOOT OF PRINCE CHARLES

YES I DO TALK TO PLANTS ACTUALLY
suppose 90% of programmers can pass fizzbuzz

suppose programmers from that 90% send out 5 resumes before being hired, and suppose the other 10% send out 45 resumes.

then that 10% of programmers will account for 50% of all CVs received

this is why a jawdroppingly easy test is so powerful in hiring

qntm
Jun 17, 2009
No back-of-the-envelope calculation is necessary, the standard explanation is "We'll stop asking Fizz Buzz at interviews when people stop failing it".

Adbot
ADBOT LOVES YOU

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

i literally dont understand how anyone applying for a programming job wouldn't be able to fizzbuzz

  • Locked thread