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
Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS
Yeah post the repo.

Adbot
ADBOT LOVES YOU

necrobobsledder
Mar 21, 2005
Lay down your soul to the gods rock 'n roll
Nap Ghost
Every company that's had me work on an assignment has implied that I shouldn't put the solution anywhere after I'm done like Github. With that said, there's always unlisted Bitbucket repos...

I'm curious what people are expecting from even a junior Java devs these days if that's the kind of criticism they're handing out. I spent like 24 hours on an infrastructure design project including a fairly substantial write-up but a great deal of the time spent was waiting for AWS CloudFormation to go through my template and fail.

Also, most companies using external recruiters are bad / no rep among those they're trying to hire and there's also companies that just don't have enough recruiters on staff to handle their hiring needs.

Good Will Hrunting
Oct 8, 2012

I changed my mind.
I'm not sorry.

Ralith posted:

It seems pretty reasonable to me. You haven't posted the challenge, but from this additional feedback it sounds like they wanted you to build a system that abstracted over multiple cloud storage providers and you gave them an interface that required S3. Maybe I'm missing something in my guesses here, but that seems like a pretty significant error.

Not at all how my code looks. It's a very generic interface, he just keeps mentioning S3 because that's the one I picked to implement. The "metadata" function is just a decorator that iterates through the "required" backends (there's a global conf file and a conf file per backend) and adds them to a metadata object. So yes I suppose he's right. In circumstances where one backend is unavailable, it won't tell you that the file is stored in that backend. I'm not above criticism, and heck I guess I learned something from this which is good.

Blinkz0rz posted:

Yeah post the repo.

For sure - if not tonight/tomorrow I'll bump the thread this weekend. It's basically the "GWH complains about being a bad dev in a city with a lot of people" thread anyway.

TooMuchAbstraction
Oct 14, 2012

I spent four years making
Waves of Steel
Hell yes I'm going to turn my avatar into an ad for it.
Fun Shoe

necrobobsledder posted:

Every company that's had me work on an assignment has implied that I shouldn't put the solution anywhere after I'm done like Github. With that said, there's always unlisted Bitbucket repos...

I'd say just post it. If they complain, tell them "Oops, I didn't realize you didn't want this online." If they point-blank told you ahead of time "don't post your work online", then they're basically demanding IP rights over your work, so you're in a work-for-hire situation and absolutely should be getting paid.

necrobobsledder
Mar 21, 2005
Lay down your soul to the gods rock 'n roll
Nap Ghost
It's a slippery slope in my mind mostly because the code is not necessarily for production or dev purposes but more like solutions to their proprietary questions. Nobody's opposed to keeping interview questions in an on-site confidential but all of a sudden anything more than FizzBuzz and people start crying foul.

I'm posting parts of what I wrote anyway once I've cleaned it up better, and some parts are of value in a blog post (part of the hiring criteria appears to be how well I can contribute to blog posts as well as writing code).

The March Hare
Oct 15, 2006

Je rêve d'un
Wayne's World 3
Buglord
If I'm understanding correctly I think I just built basically this exact thing for my current job, which is sort of funny. I made an API that creates file paths for <external storage service> and then returns you metadata (ctime, dtime, path, etc.) for that file along with an ID. It also handles handing out temporary credentials to access all of those things and can handle some scheduled file archiving and stuff. But largely it just provides metadata that is not fetched from the service storing the file as well as an interface to access that data.

Once we switch our main app over to doing all of the reads/writes using this new system we should have an external store of all file data readily on hand without ever having to actually hit whatever external service we are using.

In my case it currently only has to deal with AWS but the idea is that if we ever move off of AWS we can use this same interface for all of our poo poo.

The March Hare fucked around with this message at 00:52 on Nov 17, 2016

AskYourself
May 23, 2005
Donut is for Homer as Asking yourself is to ...

The March Hare posted:

If I'm understanding correctly I think I just built basically this exact thing for my current job, which is sort of funny. I made an API that creates file paths for <external storage service> and then returns you metadata (ctime, dtime, path, etc.) for that file along with an ID. It also handles handing out temporary credentials to access all of those things and can handle some scheduled file archiving and stuff. But largely it just provides metadata that is not fetched from the service storing the file as well as an interface to access that data.

Once we switch our main app over to doing all of the reads/writes using this new system we should have an external store of all file data readily on hand without ever having to actually hit whatever external service we are using.

In my case it currently only has to deal with AWS but the idea is that if we ever move off of AWS we can use this same interface for all of our poo poo.

For a dev with 2 years experience, 16 Hours seem a little short to complete such an assignment, unless you've already done something similar before or if you are handed decent design specs.
You mention having only vague description in sublime of what the program was for, sometime employer want to see that you will ask questions when you have them. They should make themselves available for questions and answers during the allotted time too.

Good Will Hrunting
Oct 8, 2012

I changed my mind.
I'm not sorry.
I actually asked a ton of qualifying questions, many of which he said were "great questions but beyond the scope of this challenge". I wanted to implement some sort of persistance layer (Mongo, specifically) to store metadata. That said, it really seems like he want the solution of "store a corresponding metadata file for each file on each store" and anything other than that was wrong.

I went back tonight and looked at the code and most of his critiques are confusing as poo poo to me. I have very little idea what he's talking about in some places. I'd be glad to PM anyone a link to the repo but it's got my personal info on it so I'm not gonna post it here.

The March Hare
Oct 15, 2006

Je rêve d'un
Wayne's World 3
Buglord

AskYourself posted:

For a dev with 2 years experience, 16 Hours seem a little short to complete such an assignment, unless you've already done something similar before or if you are handed decent design specs.
You mention having only vague description in sublime of what the program was for, sometime employer want to see that you will ask questions when you have them. They should make themselves available for questions and answers during the allotted time too.

Yeah, I'm about to hit two years of experience with no degree and a similarly vague spec and it took me right around a month to finish it, though much of that was qualifying what exactly was wanted and integrating it with our existing code. Still, seems like an ambitious take home to expect someone at this level to nail.

The March Hare fucked around with this message at 13:27 on Nov 17, 2016

mrmcd
Feb 22, 2003

Pictured: The only good cop (a fictional one).

I think it's fine to give candidates challenging and subtle systems design tasks, except:

a) 16 hours and a full implementation is way too much for an 'interview'
b) It should be the starting point of a conversation to see how the collaborate, if they can spot flaws after discussing it, and how they can respond to criticism and revise their design, or defend their choices and explain them intelligently. Just making GBS threads all over someone after giving them a vague and hard problem only serves mostly to make yourself feel smug. That guy is probably a nightmare to work for.

withoutclass
Nov 6, 2007

Resist the siren call of rhinocerosness

College Slice
I won't even entertain the idea of a 16 hour take home. Unless you're paying me for my time, it's absurd.

The March Hare
Oct 15, 2006

Je rêve d'un
Wayne's World 3
Buglord

withoutclass posted:

I won't even entertain the idea of a 16 hour take home. Unless you're paying me for my time, it's absurd.

Agreed. The last time I did interviews I had a few 1~2 hour take home assignments for jr. positions in and around NYC. They were all totally doable in that time-frame and worked well as something to talk about during an actual interview rather than asking me to whiteboard Battleship for the 90th time or whatever.

I don't remember any of the specifics, but they were generally things like "here is a data file - write some script to ingest and transform that data and output it in some meaningful way". Very often this involved sanitizing the data, doing moderately complex transforms on multidimensional arrays, that kind of thing. Once they saw that I could do this they would move into "what would you do if the data file couldn't fit in memory?" types of questions. I found it really pleasant, but the poo poo being described above sounds Bad to me.

The March Hare fucked around with this message at 15:27 on Nov 17, 2016

Good Will Hrunting
Oct 8, 2012

I changed my mind.
I'm not sorry.
A friend of mine said he knows one of the VP level folks at this place, one I'd have to work with at least to some extent, from his time in SF and that he's a "huge cockbag". He would have steered me clear of the place had things gone further, so overall a bullet dodged I guess. I've met at least one tremendous prick at every start-up I've interviewed with in NYC.

Hughlander
May 11, 2005

Good Will Hrunting posted:

I actually asked a ton of qualifying questions, many of which he said were "great questions but beyond the scope of this challenge". I wanted to implement some sort of persistance layer (Mongo, specifically) to store metadata. That said, it really seems like he want the solution of "store a corresponding metadata file for each file on each store" and anything other than that was wrong.

I went back tonight and looked at the code and most of his critiques are confusing as poo poo to me. I have very little idea what he's talking about in some places. I'd be glad to PM anyone a link to the repo but it's got my personal info on it so I'm not gonna post it here.

Now I'm really curious as to what are the other requirements there.

Can you delete files?
Can you iterate files?

If both were yes, were you expected to also deal with synchronization issues where file 123 is deleted from backend A, C, D but B was down at the time and later you want to iterate over all files and A, C, D backends are down? When B comes back up are you expected to have a list of actions to perform like delete 123?

Good Will Hrunting
Oct 8, 2012

I changed my mind.
I'm not sorry.
No, it was just put, fetch, and metadata. I'll post this for a bit so people can check it out then take it down later.

quote:

# Distributed File Store

Build an HTTP service that takes a key and a file and stores it on various 3rd-party backends according to a replication strategy. The application should support retrieving the file for a key, and inspecting metadata about a key.

This challenge is fairly open-ended, so your job is to produce a v1 of this service. Your decisions about what functionality to include / exclude will be factored into our assessment of your work.

## Endpoints

`POST /:key`

Request must include a `Content-Type` header with the appropriate MIME type, and a body that is just the raw file content. If the key exists, overwrite the existing file.

`GET /:key`

Response should include the same `Content-Type` header and raw file content as the original `POST` for the key. Return a 404 if the key doesn't exist.

`GET /metadata/:key`

Should return a JSON document with metadata about the specified key. Something like:

```
{
"uploadedAt": "2016-10-20T15:12:16+00:00"
"bytes": 1024,
"copies": [
{
"backend": "s3",
"uploadedAt": "2016-10-20T15:12:17+00:00"
"details": {
"bucket": "myBucket",
"key": "path/to/key"
}
},
{
"backend": "dropbox",
"uploadedAt": "2016-10-20T15:12:18+00:00"
"details": {
"path": "path/to/file"
}
}
]
}
```

## Backends

A backend is any 3rd-party service where you can store the uploaded bytes, e.g. S3, Dropbox, GitHub, etc. The idea is that if one of the backends is not available, _all_ endpoints should continue to function normally. Thus, the application should support at least two backends.

I should be able to configure which backends are active, the credentials they use, along with buckets or folders where data should be stored, etc.

## Constraints

I should also be able to configure constraints that the service must satisfy. These include:
- the total number of bytes that can be stored on a particular backend (across all files)
- a MIME type whitelist / blacklist per backend
- a global replication level, i.e. the minimum number of copies that should be made of every file

Some things to consider with respect to the constraints:
- how does the application respond if an upload only satisfies the constraints of fewer backends than the configured replication level?
- what happens if an upload _must_ be stored on a particular backend (due to constraints), but that backend is unavailable?

AskYourself
May 23, 2005
Donut is for Homer as Asking yourself is to ...
wow just... I can't even ...

Had someone gave me that assignment (I have more than 2 years experience), I would have made a DB diagram and maybe some kind of dataflow/interaction type of diagram. Then I would have done some general namespace architecture, put in a couple of interfaces and empty class but I would never have spent more than a couple of hours on this.

Maybe if I really liked the place and not been employed I would have coded for a few more hours. I would have put my copyright notice all over that poo poo too because really this smell of work stealing.

I think you dodged a bullet.

Are all startup in NYC asking for stuff like this ? It sounds extreme to me.

Edit : Now that I think more about it, I would have probably asked to be compensated for this consulting work, especially for the architecture part. If not I would have asked for the scope to be reduced to a 2 hours task and walked away if they refused. I'm not anyone bitch and starting a professional relation by making you slave away for 2 days is disrespectful. gently caress them.

AskYourself fucked around with this message at 20:16 on Nov 17, 2016

the talent deficit
Dec 20, 2003

self-deprecation is a very british trait, and problems can arise when the british attempt to do so with a foreign culture





that seems like a reasonable assignment assuming you don't have to write a distributed metadata store as part of it. if you're allowed to store metadata in postgres or dynamo or cassandra or something the criticisms seem reasonable

in two hours you should be able to throw together a basic http interface, a class/module that can read/write metadata and a stubbed out interface to the various backends. if i'd assigned that i would have been pretty happy with that result

if they expected you to write a consistent distributed db in 16 hours tho you should have just passed on the assignment and not bothered pursuing the job

the talent deficit fucked around with this message at 20:21 on Nov 17, 2016

Good Will Hrunting
Oct 8, 2012

I changed my mind.
I'm not sorry.

AskYourself posted:


Are all startup in NYC asking for stuff like this ? It sounds extreme to me.

The last place I had an assignment to write a poker game player including a hand checker. 4 hours after unit tests. It was also round 3 after I had my initial phone screen so I knew they were interested me.

This weekend's assignment is a REST Api with a few endpoints for managing a chat app back-end that talks to a SQL db. I imagine it will take 4-5 hours if I use Java or 8-ish if I use Go, which is the language they use.

the talent deficit posted:

that seems like a reasonable assignment assuming you don't have to write a distributed metadata store as part of it. if you're allowed to store metadata in postgres or dynamo or cassandra or something the criticisms seem reasonable

if they expected you to write a consistent distributed db in 16 hours tho you should have just passed on the assignment and not bothered pursuing the job

Not sure if I posted this in an earlier post, but my initial solution was "Can I use a datastore?" and the answer was no. I planned on having a very simple Mongo collection.

the talent deficit
Dec 20, 2003

self-deprecation is a very british trait, and problems can arise when the british attempt to do so with a foreign culture





Good Will Hrunting posted:

Not sure if I posted this in an earlier post, but my initial solution was "Can I use a datastore?" and the answer was no. I planned on having a very simple Mongo collection.

they're just clueless then. they basically asked you to implement dynamo or paxos

Good Will Hrunting
Oct 8, 2012

I changed my mind.
I'm not sorry.

the talent deficit posted:

they're just clueless then. they basically asked you to implement dynamo or paxos

Going back and looking at this again, I literally asked "Is there a layer of persistence I can add for X reasons?" and they said "No, that's beyond the scope of this assignment".

spiritual bypass
Feb 19, 2008

Grimey Drawer
Those people are loving clueless

JawnV6
Jul 4, 2004

So hot ...
I can guarantee they're having conversations about how they can't find any good devs and at no point will the homework, and it's worthless judging criteria, be implicated at fault.

spiritual bypass
Feb 19, 2008

Grimey Drawer
There's no way any of them were hired by such a test

The March Hare
Oct 15, 2006

Je rêve d'un
Wayne's World 3
Buglord

Good Will Hrunting posted:

Going back and looking at this again, I literally asked "Is there a layer of persistence I can add for X reasons?" and they said "No, that's beyond the scope of this assignment".

Oh, rofl, I missed this part. Yeah, that's loving insane.

Urit
Oct 22, 2010
To me it sounds like they wanted a file.ext.metadata.txt file (or something like it) side-by-side with the actual file itself in each backend that you then read when the interface was asked for metadata. That doesn't address deletes etc. though.

Still, implementing a distributed storage system with no SPOF as a test as dumb as heck. I could see if they gave you a half-finished one and said "add a feature", though.

necrobobsledder
Mar 21, 2005
Lay down your soul to the gods rock 'n roll
Nap Ghost
The hunch I had is that if you get the "trick" they were expecting, you won't take more than a couple hours to write it out. From what I can figure out for a "naive" solution, you could keep copies of the metadata on all nodes and all backends (with timestamps) and each node is responsible for its own state primarily and that deletes being destructive are not done without consensus and you can use copy-on-write type of conventions to handle cases for overwriting files. But doing all that from scratch without some backing service for the sake of testing / conversation? Yeesh.

But at that point of explanation I'd just start thinking "ok, unless we're talking files beyond a certain size I'm starting to implement Zookeeper, Paxos, etc. and should stop now instead of reinventing a very tough to write wheel."

return0
Apr 11, 2007
I don't get it. You mentioned it supports put, get, and some usage constraints.

What are the desired semantics for conflict resolution. E.g., backend A is S3 in USA and local user puts value to item xyz, backend B is Dropbox with a datacentre in Asia and a local user puts different value for item xyz simultaneously with other put. Both systems internally have some form of eventual consistency. How does it work?

Also, if meta data is a regular file, this would require the backend to support batch transactional put, or data races will occur (ignoring eventual consistency model issues).

Did the spec talk about this?

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

return0 posted:

I don't get it. You mentioned it supports put, get, and some usage constraints.

What are the desired semantics for conflict resolution. E.g., backend A is S3 in USA and local user puts value to item xyz, backend B is Dropbox with a datacentre in Asia and a local user puts different value for item xyz simultaneously with other put. Both systems internally have some form of eventual consistency. How does it work?

Also, if meta data is a regular file, this would require the backend to support batch transactional put, or data races will occur (ignoring eventual consistency model issues).

Did the spec talk about this?

the full spec is right there..

FamDav
Mar 29, 2008
One idea might be that every key gets its own directory and you store the file ands it's metadata with a name that is the epoch concatenated with a hash of the contents. Retrievals take the newest file found, tie break on hash. This would have the nice properties that:

* a lot of eventually consistent stores do let you read your creates, so new files and "modifications" should immediately be viewable from ex s3
*simultaneous modification is possible and resolves consistently by time and then hash
* you can easily garbage collect each file with a background reaper to reduce space usage

Metadata and the file being separate is still an issue. Writing metadata before the file and having your application retrieve the newest metadata for a file it can also find should resolve that.

FamDav fucked around with this message at 16:11 on Nov 18, 2016

Good Will Hrunting
Oct 8, 2012

I changed my mind.
I'm not sorry.
Sorry for derailing the thread so much, but I appreciate everyone's insight. It's made me feel better slightly and the discussions/questions have been insightful, at least to me.

taqueso
Mar 8, 2004


:911:
:wookie: :thermidor: :wookie:
:dehumanize:

:pirate::hf::tinfoil:
So I did the interview, everyone was really great and I think it was just HR being HR douches. The company has a few locations, and local HR was really nice and down to earth. Corporate headquarters HR is much more, well, corporate. They were mostly just making me jump through annoying hoops, not being total scum, so I can give that a pass if everything else seems good. I'm still not sure if they will be willing to meet my salary requirements should I get an offer.

I had to complete a 'tech assessment' take home test - it was 10 questions of which I had to choose and complete 5. They said it was supposed to take between 2 and 5 hours, which was not enough time to produce answers that were up to my quality standards. I spent about 8 hours and I was still a little disappointed with the result, but they had warned against 'showing off' by spending too much time. I told them how I felt about the time and they said they were still trying to tune the assignment. The team is all ME and EE, so I can see how they might have a hard time judging CS problem complexity.

return0
Apr 11, 2007

FamDav posted:

One idea might be that every key gets its own directory and you store the file ands it's metadata with a name that is the epoch concatenated with a hash of the contents. Retrievals take the newest file found, tie break on hash. This would have the nice properties that:

* a lot of eventually consistent stores do let you read your creates, so new files and "modifications" should immediately be viewable from ex s3
*simultaneous modification is possible and resolves consistently by time and then hash
* you can easily garbage collect each file with a background reaper to reduce space usage

Metadata and the file being separate is still an issue. Writing metadata before the file and having your application retrieve the newest metadata for a file it can also find should resolve that.

This is a classic data race, and does not work in the presence of multiple users.

FamDav
Mar 29, 2008
Nobody is writing to the same location in a backend; every modification is creating a new set of files under a key. So conflict resolution is performed by querying for the set of files it can find in a backend and applying a total order to them to figure out what the current revision is. The total ordering is a bit lame because happened after is murky due to ntp drift, but if you cared about a stronger happened after ordering you would allow a better data store for metadata.

If you wanted to provide it, you could do reads across all backends to pick the latest revision that exists in N backends for a quorum read (if it's not committed to N backends, I don't consider it durable). This gets you out of having to implement rollback of partially failed writes; a file that never made it to your desired number of replicas will never be returned, while a file that did will eventually be returned (or some newer version).

FamDav
Mar 29, 2008
Though really you should just be able to use a key-value store like dynamodb that allows conditional, quorum writes for your metadata. You probably do want to fail if someone else updates a key while you were trying to update it, as opposed to just a guarantee that the system would eventually converge to some state for all parties.

Good Will Hrunting
Oct 8, 2012

I changed my mind.
I'm not sorry.
I went to put myself into another batch on Hired.com and they changed my profile (multiple parts including summary and pitch!) without telling me. Cool, you fucks.

zerofunk
Apr 24, 2004
Don't they tell you up front that may happen? I used it over a year ago, so I don't remember the details now but I remember it being listed as as a possibility. You're supposed to be able to talk to them about it if you're not comfortable with the changes.

Good Will Hrunting
Oct 8, 2012

I changed my mind.
I'm not sorry.
They changed my summary that said something about back-ended work being my expertise and what I'm looking for to "Software engineer with JS experience".

zerofunk
Apr 24, 2004
Yeah, that's pretty crappy. I'm sure they'll change it back for you, but definitely annoying.

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



Good Will Hrunting posted:

They changed my summary that said something about back-ended work being my expertise and what I'm looking for to "Software engineer with JS experience".

*extremely interviewer voice* "Good afternoon Mr Hrunting (or can I call you Good?) and thank you for taking the time out of your busy day for this phone screen. Go ahead and explain prototypal inheritance and how the this keyword works as if I were five."

Adbot
ADBOT LOVES YOU

Good Will Hrunting
Oct 8, 2012

I changed my mind.
I'm not sorry.

zerofunk posted:

Yeah, that's pretty crappy. I'm sure they'll change it back for you, but definitely annoying.

It has left me wondering whether they changed this before my first batch, too. I got a ton of "full-stack" stuff even though I explicitly said I was interested in 100% back-end/data stuff.

Munkeymon posted:

*extremely interviewer voice* "Good afternoon Mr Hrunting (or can I call you Good?) and thank you for taking the time out of your busy day for this phone screen. Go ahead and explain prototypal inheritance and how the this keyword works as if I were five."

:allears: This hits a little too close to home with some of the screens I've had lately.

I'm thinking of giving Underdog.io another shot. I had three good matches there that I skipped on because they were Python and I was mostly interested in staying Java/Scala but I found their process to be a lot better. They have someone actually speak with you and reply to emails within a few hours!

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