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.
 
  • Post
  • Reply
Sapozhnik
Jan 2, 2005

Nap Ghost
Perl has an API for SQL databases that doesn't suck

that's more than I can say for Python

also these are literally bog standard CRUD operations, there's like twenty subcommands that all boil down to

create prepared statement
bind parameters
execute and maybe check the affected row count to ensure the WHERE clause matched
print out the result set if applicable

Adbot
ADBOT LOVES YOU

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

tef posted:

i am pretty sure i got rejected by fb ~12 months ago, in london

kinda applied for the wrong job, they also sent me to the wrong hotel, and uh, i was not in the mood for silly interview games after traipsing across london to find somewhere to sleep

yeah, that sounds like a lovely experience. sorry. :-(

implement-this-thing isn't generally motivated by the need to have you do that in the field. it's really a shibboleth for facility with CS principles. there are definitely false negatives from it, as with anything as crude as interview questions. the "can you do good engineering" interview is a different one ("pirate"!), but again it's a heuristic. when I interviewed for a director position, I had to rotate an image buffer -- not because I was likely to have to do that as part of my job, but because it was a way to measure a certain kind of technical depth. it's really not all about the quality of the result but about how people reason their way through it, react to feedback or changes, ask questions and state assumptions, can explain why they made the choices they did. you can do pretty badly on the result of a "ninja" and still get an offer, if the other signals are good. (that said, I did write threaded C code in bootcamp, so I guess I ended up using similar skills in the field.)

"solve an actually complex problem" isn't really a tenable thing in 45-min engineering interviews, because it requires a really good match between domain experience and the problem (for both candidate and interviewer) and complex problems take a while to nail down in terms of assumptions and such. I'm interested in a longer-form systems interview model for experienced candidates, but it takes a long time to get that right and calibrate interviewers and so forth.

(I think the silly names are as good a shorthand as anything else. it helps with people coming in from other environments and thinking "I know how to do a ds&a interview" before learning about how we do them and why they're that way)

I doubt many of our interviewers are prepared for a candidate to be adversarial. Mostly people want to get along, and if they can't bring up "why do this?" in a pleasant way then that's honestly a pretty relevant signal for whether or not you'd want to work with that person.

Nomnom Cookie
Aug 30, 2009



Mr Dog posted:

Perl has an API for SQL databases that doesn't suck

that's more than I can say for Python

also these are literally bog standard CRUD operations, there's like twenty subcommands that all boil down to

create prepared statement
bind parameters
execute and maybe check the affected row count to ensure the WHERE clause matched
print out the result set if applicable

spring JdbcTemplate has like 3,500 methods and 3,450 are overloads. i like it that way tbh

Soricidus
Oct 21, 2010
freedom-hating statist shill

Gazpacho posted:

well given that ruby doesn't have the "more than one way" philosophy behind it you have a better chance of coming into existing code and beginning to understand it without fighting the last guy's unique snowflake conventions
sure, right, the language that popularised dsls for this generation definitely doesn't have a worse problem with special snowflake syndrome than perl, a language where the weirdest thing you'll actually see anyone using is postfix "unless".

i guess it's better than scala where everyone's unique snowflake dsl also uses unique snowflake operators, but i would sooner bite out my own kidneys than take a job maintaining someone else's ruby code, and i say this as someone who recently spent an enjoyable day fixing bugs in some perl that was apparently written before the invention of indentation.

emoji
Jun 4, 2004

Mr Dog posted:

Instead of writing full on web MVC and stored procs for a bunch of admin tools nobody other than me is ever going to use, I write some 500 line Perl scripts.

WorksForMe(TM).

Postgres support under Python is and continues to be a trainwreck. And I don't know Ruby so I don't see any reason to learn it on account of a few lovely admin scripts.

Python is really good for data mining stuff but really bad at databases such that the ungodly hack known as JPype is better for manipulating large proprietary databases with java drivers using your own DB API implementation in Python

tractor fanatic
Sep 9, 2005

Pillbug
can i assume that a = c - b implies a + b >= c always for floats?

gonadic io
Feb 16, 2011

>>=

tractor fanatic posted:

can i assume that a = c - b implies a + b >= c always for floats?

I'm pretty sure not, due to overflow

Notorious b.s.d.
Jan 25, 2003

by Reene

Malcolm XML posted:

do u know what RoR does to ruby internals

ruby 2.1 makes it possible to fix this because monkey patching can be scoped
(of course, that will not stop every library in the world from requiring activesupport)

Notorious b.s.d.
Jan 25, 2003

by Reene

Shinku ABOOKEN posted:

how do you loop over a file line by line in perl?

Perl code:
#!/usr/bin/env perl
use warnings;
use strict;
use English;

my $FILE = IO::file->new("file", "r")
foreach my $line (<$FILE>)
{
   print STDOUT "Shinku has been an idiot for $INPUT_LINE_NUMBER lines\n"
}

MononcQc
May 29, 2007

use Awk :smuggo:
code:
{ print "Shinku has been an idiot for", NR, "lines" }

Notorious b.s.d.
Jan 25, 2003

by Reene

Subjunctive posted:

implement-this-thing isn't generally motivated by the need to have you do that in the field. it's really a shibboleth for facility with CS principles. there are definitely false negatives from it, as with anything as crude as interview questions. the "can you do good engineering" interview is a different one ("pirate"!), but again it's a heuristic. when I interviewed for a director position, I had to rotate an image buffer -- not because I was likely to have to do that as part of my job, but because it was a way to measure a certain kind of technical depth. it's really not all about the quality of the result but about how people reason their way through it, react to feedback or changes, ask questions and state assumptions, can explain why they made the choices they did. you can do pretty badly on the result of a "ninja" and still get an offer, if the other signals are good. (that said, I did write threaded C code in bootcamp, so I guess I ended up using similar skills in the field.)

this is dumb as gently caress. just insufferably dumb. if you can flub the "ninja" interview and still get the job "if other signals are good," that means the SNR for your "ninja" interview is 0. it contributes nothing.

also i'm really tired of being asked to solve some problem out of taocp at every programming interview ever. rotating an image buffer is not a meaningful problem that will indicate my performance under pressure

traditional non-techy firms run by adults have worked around this with what they call "case" interviews, where you try to work through an actual business problem from the past, involving a business that actually existed. so you won't be rotating image buffers as a case study for writing web applications.

Workaday Wizard
Oct 23, 2009

by Pragmatica

Notorious b.s.d. posted:

Perl code:

#!/usr/bin/env perl
use warnings;
use strict;
use English;

my $FILE = IO::file->new("file", "r")
foreach my $line (<$FILE>)
{
   print STDOUT "Shinku has been an idiot for $INPUT_LINE_NUMBER lines\n"
}

what does <$FILE> mean?

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...

Shinku ABOOKEN posted:

what does <$FILE> mean?

"iterate over this file handle in scalar context", which means "give me each line of this file individually"

Blotto Skorzany
Nov 7, 2008

He's a PSoC, loose and runnin'
came the whisper from each lip
And he's here to do some business with
the bad ADC on his chip
bad ADC on his chiiiiip

Notorious b.s.d. posted:

this is dumb as gently caress. just insufferably dumb. if you can flub the "ninja" interview and still get the job "if other signals are good," that means the SNR for your "ninja" interview is 0. it contributes nothing.

the 'other signals' include the second "ninja" interview

Notorious b.s.d.
Jan 25, 2003

by Reene

Shinku ABOOKEN posted:

what does <$FILE> mean?

shorthand for "readline($FILE)"

it's used pervasively in the perl documentation so it's just one of those things you learn whether you like it or not. like ruby's dumbass block passing. or python whitespace.

Notorious b.s.d.
Jan 25, 2003

by Reene

Otto Skorzeny posted:

the 'other signals' include the second "ninja" interview

not an excuse

shrughes
Oct 11, 2008

(call/cc call/cc)

Notorious b.s.d. posted:

this is dumb as gently caress. just insufferably dumb. if you can flub the "ninja" interview and still get the job "if other signals are good," that means the SNR for your "ninja" interview is 0. it contributes nothing.

No it does not mean that.

Notorious b.s.d.
Jan 25, 2003

by Reene

shrughes posted:

No it does not mean that.

it's unrelated to your job, and it doesn't matter if you pass or fail because "other signals" are more important. seems pretty g-d useless to me

fritz
Jul 26, 2003

Shinku ABOOKEN posted:

how do you loop over a file line by line in perl?

-n or -p on the command line

shrughes
Oct 11, 2008

(call/cc call/cc)

quote:

also i'm really tired of being asked to solve some problem out of taocp at every programming interview ever. rotating an image buffer is not a meaningful problem that will indicate my performance under pressure

Why the gently caress would anybody care about your "performance under pressure"? You feel pressure in the workplace? Do you just sit there all stressed out?

Notorious b.s.d. posted:

traditional non-techy firms run by adults have worked around this with what they call "case" interviews, where you try to work through an actual business problem from the past, involving a business that actually existed. so you won't be rotating image buffers as a case study for writing web applications.

Uh... it's perfectly reasonable for you to be able to write code and solve algorithmic problems when you're going to work at a job writing code and facing algorithmic problems. If you want to be some scrub-tier shitlord web dev that can't solve extremely simple toy problems, Facebook is right not to hire you.

shrughes
Oct 11, 2008

(call/cc call/cc)

Notorious b.s.d. posted:

it's unrelated to your job, and it doesn't matter if you pass or fail because "other signals" are more important. seems pretty g-d useless to me

Let's try to make an analogy you can understand.

It's like this. If you make one dumb post, people might think, hey, look at all these other posts you made that aren't dumb! Probably you're not dumb. (Just being hypothetical here.)

But if you make dumb post after dumb post after dumb post, and you can't even grasp the idea of making a judgement based on something other than the is-perfect/isn't-perfect bit, people are right to think, "This guy's pretty dumb," in reference to you. (Totally being completely hypothetical here.) It's as if the hypothetical you is of those people that just can't process an idea "the probability of X is [some number not equal to 0 or 1]" and can't build up piecewise probabalistic components when forming beliefs or making decisions, because their brain is just broken and every component of their belief about the world has to be an absolutistic 1 or 0.

fritz
Jul 26, 2003

Notorious b.s.d. posted:

this is dumb as gently caress. just insufferably dumb. if you can flub the "ninja" interview and still get the job "if other signals are good," that means the SNR for your "ninja" interview is 0.

i dont follow, a signal doesn't have to be perfect to be informative

Notorious b.s.d.
Jan 25, 2003

by Reene

shrughes posted:

If you want to be some scrub-tier shitlord web dev that can't solve extremely simple toy problems, Facebook is right not to hire you.

yeah screening out the people who can't solve extremely simple toy problems is probably valuable. assign one as homework before you waste any humans time on it.

the problem is the other direction: when we take "toy" problems as indicative of job performance. that's loving stupid.

Nomnom Cookie
Aug 30, 2009



tractor fanatic posted:

can i assume that a = c - b implies a + b >= c always for floats?

you can but i wouldn't be surprised if it bites you in the rear end

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

Gazpacho posted:

well given that ruby doesn't have the "more than one way" philosophy behind it you have a better chance of coming into existing code and beginning to understand it without fighting the last guy's unique snowflake conventions

At my job we use RoR but the guys who started it were all a bunch of php devs who didn't need or understand any of the 'rails magic' so 8 years later there is very little rails remaining.

Everything is just custom. There's very little of the rails routing system left, we have our own rendering thing.

I'm sure it would be great but it's almost entirely undocumented and uncommented so it's like learning a dsl the size of rails without anything to guide you. Also it's much more confusing and poorly designed than rails because at the end of the day we are product driven and our code base is driven entirely by 'get it done fast so we can build the next thing'

I'm guessing this is mostly normal

EAT THE EGGS RICOLA
May 29, 2008

USSMICHELLEBACHMAN posted:

At my job we use RoR but the guys who started it were all a bunch of php devs who didn't need or understand any of the 'rails magic' so 8 years later there is very little rails remaining.

Everything is just custom. There's very little of the rails routing system left, we have our own rendering thing.

I'm sure it would be great but it's almost entirely undocumented and uncommented so it's like learning a dsl the size of rails without anything to guide you. Also it's much more confusing and poorly designed than rails because at the end of the day we are product driven and our code base is driven entirely by 'get it done fast so we can build the next thing'

I'm guessing this is mostly normal

O hey this is what I'm doing but with an 8 year old python web app.

shrughes
Oct 11, 2008

(call/cc call/cc)

tractor fanatic posted:

can i assume that a = c - b implies a + b >= c always for floats?

I assume you mean a == c - b, rather than assignment. For if c or b were NaN and that was assignment, then of course the condition on the right would fail.

Also, if c is a real number, and b is +infinity, and a is -infinity, then a + b will be NaN (I think) and the comparison will fail.

Suppose (with single-precision floats, where the numbers 1 - 2^-24, 1, and 1 + 2^-23 are representable, but nothing in between) we have a = 1, b = 2^-24, and c = 1 + 2^-23. Then we have c - b rounding-to-even and evaluating to 1. Thus, a == c - b. But a + b also rounds to even, evaluating to 1. So a + b < c is true, and a + b >= c is false.

Edit: Yeah, pretty much any time "c - b" would round down, look out! Maybe you'll get lucky and a + b will round up to c, but.. maybe not. Another example is if c = 0.5 - 2^-25 and b = -1. Then c - b evaluates to 1.5 and 1.5 + b evaluates to 0.5.

shrughes fucked around with this message at 23:26 on Jul 8, 2014

Mr. Glass
May 1, 2009

Notorious b.s.d. posted:

the problem is the other direction: when we take "toy" problems as indicative of job performance. that's loving stupid.

smdh if you think there is any way to test for "job performance", or that that is somehow the point of a technical interview

Malcolm XML
Aug 8, 2009

I always knew it would end like this.

Notorious b.s.d. posted:

it's unrelated to your job, and it doesn't matter if you pass or fail because "other signals" are more important. seems pretty g-d useless to me

i interviewed at fb

first few interviews had some algo problems, totally uselss but the idea was that it revealed ur problem solving process

then the rest were all job related with maybe a "do it in python on the board"

my "out" for a bunch of coding cases is "do u mind if I reuse X from stdlib/basic poo poo?" if they refuse its usually a sign they are bad

prob the nicest interview experience i ever did tbh, i liked everything about the place and people

Malcolm XML
Aug 8, 2009

I always knew it would end like this.

Malcolm XML posted:

i interviewed at fb

first few interviews had some algo problems, totally uselss but the idea was that it revealed ur problem solving process

then the rest were all job related with maybe a "do it in python on the board"

my "out" for a bunch of coding cases is "do u mind if I reuse X from stdlib/basic poo poo?" if they refuse its usually a sign they are bad

prob the nicest interview experience i ever did tbh, i liked everything about the place and people

but for ~*reasons*~ i ended up elsewhere

Malcolm XML
Aug 8, 2009

I always knew it would end like this.
like usually i understand peeps complaining about algo problems b/c if a company uses that as its only measure its useless plus anything more than basic stuff is entirely pointless

u have to tread the fine line of easy enough to work out in an 1hr interview with just a whiteboard but not too hard and not literally trivial

like in current job we have peeps who can't make it past the "detect if a string is a palindrome" step, even in pseudocode, which i usually accept

Star War Sex Parrot
Oct 2, 2003

Malcolm XML posted:

but for ~*reasons*~ i ended up elsewhere
ur too smart for that place

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...

Malcolm XML posted:

my "out" for a bunch of coding cases is "do u mind if I reuse X from stdlib/basic poo poo?" if they refuse its usually a sign they are bad


i guess I'm bad then because when i ask you to implement string.replace i am obviously not expecting you to write "String.replace(...)"

if you ask, i'll give you bonus points in my head, tho

Malcolm XML
Aug 8, 2009

I always knew it would end like this.
being adversarial with an interviewer is just a great way to waste evryones time honest;y if it's clear u wont wanna work with them just do the professional thing and end it there

Malcolm XML
Aug 8, 2009

I always knew it would end like this.

Dessert Rose posted:

i guess I'm bad then because when i ask you to implement string.replace i am obviously not expecting you to write "String.replace(...)"

if you ask, i'll give you bonus points in my head, tho

well obvs but if it's like "implement this algo on stuff fed from a file" usually i just ask "can i have a file.readline function already defined?" "can i assume there's a file parser?" etc

Malcolm XML
Aug 8, 2009

I always knew it would end like this.

Star War Sex Parrot posted:

ur too smart for that place

nah threre were some insanely smart peeps there but the team i inteviewed was crazy smart but also very chill about things

occasionaly i wonder what would have been if i accepted


lots more sunshine :(

Star War Sex Parrot
Oct 2, 2003

Malcolm XML posted:

lots more sunshine :(
what region are you in now

Star War Sex Parrot
Oct 2, 2003

all i know is that you post good poo poo in the math thread in SAL

Star War Sex Parrot
Oct 2, 2003

also i have no idea what Xeom's doing in CoC's C++ thread

Adbot
ADBOT LOVES YOU

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord

Notorious b.s.d. posted:

shorthand for "readline($FILE)"

it's used pervasively in the perl documentation so it's just one of those things you learn whether you like it or not. like ruby's dumbass block passing. or python whitespace.

oh yeah elusive shorthand syntax is just as bad as whitespace

also you forgot to import IO::File and a semicolon

MononcQc posted:

use Awk :smuggo:
code:
{ print "Shinku has been an idiot for", NR, "lines" }

awk is cheating, it's like using bc -l for quick trig calculations

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply