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
FamDav
Mar 29, 2008
Speaking of codility, I did the self-cert test(the min_abs_sum one) coming up with what I think is a pretty good algorithm.

Negative. Doesn't tell me what it fails at, either.

So on a whim I code up the problem exactly as it asks in python. I code val, I use itertools to get all possible choices for S, and then I take the best answer.

I still get negative.

What gives?

code:
import itertools

def val(A,S):
    sum = 0
    for i in range(0,len(A)):
        sum += A[i]*S[i]
        
    return (-sum if sum < 0 else sum)

def min_abs_sum ( A ):
    best_answer = 100000000 # more than 100*2000 or whatever their max is.
    for x in itertools.product([-1,1],repeat=len(A)):
        curr_sum = val(A,x)
        if (curr_sum < best_answer):
            best_answer = curr_sum
    return best_answer
I expect for you all to tell me how stupid I am, but this is really bugging me.

Adbot
ADBOT LOVES YOU

FamDav
Mar 29, 2008

iam posted:

I'm soon to be applying for developer roles after finishing a one year MSc in CompSci, and whilst we covered sorts etc in algorithms, all this talk of algorithms is making me :psyduck:

I'd call myself quite a competent Java developer, but ask me to implement a sorting algorithm off the top of my head in an interview and I'll probably just break down there and then

I don't think you need to know hot to implement quick sort (but who really forgets? It's not that hard), but it is important to understand the basic structure of nlogn sorting, just as it is important to understand logarithmic search and what it looks like in a structure, how to construct a dynamic programming solution to a problem, etc.

For example, there is/was a Codility problem whose solution relies on the principles behind merge sort but is not actually an implementation of merge sort. If all you know is that quick sort sorts a list really fast, you probably won't see that structure immediately and poke around at the problem for far longer than you should.

FamDav
Mar 29, 2008

shrughes posted:

taking trivially easy CS classes while surrounded by generic Comp Sci students who grimace at the thought of recursion and bitch about having to learn useless functional languages?

The moral of the story is that you should avoid a CS degree so as to make it difficult to get a job at lovely companies. The expected value of the company you do work for is thus higher.

Maybe you should've gone to a better school?

Edit: Though I do agree that a lot of programs provide very easy classes because they have to cater to who they're teaching. If you go to a top 10 uni or lac you're going to get a much better again. If you can't get in well whelp hope you can teach yourself.

FamDav fucked around with this message at 02:14 on Jan 4, 2012

FamDav
Mar 29, 2008
Rejection e-mails hurt deep, yo :(.

EDIT: But interview e-mails heal even the deepest wounds :).

FamDav fucked around with this message at 20:55 on Apr 2, 2012

FamDav
Mar 29, 2008
What's a real expectation for starting salary as a software engineer in Oregon? Let's assume it's on the higher end there.

FamDav fucked around with this message at 01:54 on May 2, 2012

FamDav
Mar 29, 2008

Ithaqua posted:

I'm not saying that it's useless. I'm just saying that it's highly unlikely that the interviewer is going to write an algorithm out on a whiteboard and ask what the worst-case complexity is. It could happen, but it's never happened to me.

I don't think I've ever had someone write an algorithm out and ask me to analyze its runtime, but I've certainly been asked to analyze the runtime of almost every algorithm I've presented.

FamDav
Mar 29, 2008
Here's where the difference comes in (in my opinion).

When an interviewer tells you to implement fizz buzz as spitting out the sequence for 1 to 100, he wants you to follow that spec. You shouldn't deviate from it and your underlying implementation should be targeted at fulfilling the spec, not everything under the sun.

Interviewers also want to know that you write good code. This means well commented, either through good comments or good variable/function/method names (or both!), and code that runs well and is accepted as good practice in that language. This last part could mean making sure you use correct method calls like each with a block in Ruby or making sure you have destructors in your C++ code. This also means you try and get the best algorithmic runtime, but you should have had that beat into your head by now.

In short, meet the spec but do not purposefully exceed it and make sure your code is something they'd want in their codebase.

EDIT: Like the guy above me says, use it to your advantage. By making a comment outline and filling it in, you know exactly what is left to fill and it can help with spotting errors.

FamDav fucked around with this message at 00:10 on Jun 7, 2012

FamDav
Mar 29, 2008
They even make it easier since you don't have to handle the edge cases! :rimshot:

FamDav
Mar 29, 2008

Tres Burritos posted:

Unless you're one of those math genius types. Otherwise, what he said.

I think a better way of putting this is that if you haven't had a proof-based course then it is very likely that both classes will be difficult for you. After taking one the other will most likely be much easier, especially if you do automata then algorithms.

Disclaimer: I'm a math guy who had a very easy time with both classes.

FamDav
Mar 29, 2008

KidDynamite posted:

And the code you do learn in school is ugly as gently caress and lots of times very stupid. I can provide my github as proof.

Well that really depends on where you go, and similarly any sufficiently old codebase is going to have demons lurking around. Though god help anybody who has to work with NACHOS.

FamDav
Mar 29, 2008
I interview as part of a team so I'm able to be a little more specific with my approach and know that I can still get the full picture, but I usually try and ask "philosophy" questions as well as probe the resume. Specifically, I try and find things on the resume that might be interesting but are either vague or not well explained and see if I can get a dialogue going about that.

FamDav
Mar 29, 2008

Strong Sauce posted:

I think a lot of interviewers favor reverse string because in general it is pretty simple and like all other interview questions there are multiple solutions to them. And the in-place solution requires a swap I believe so it's another topic for someone to describe.

I haven't failed a reverse string question, but I have done goofed up on simple questions. Sometimes it happens where your brain locks up and something simple becomes difficult to handle.

I suppose if you want a has-a-pulse test, reversing a string isn't the worst. Realistically you'd give them something more involved as a weeder.

If you want an algorithm question, you could at least ask something more interesting like "Reverse all the words in the string".

FamDav
Mar 29, 2008

Karanth posted:

It's good to use warm-up questions. They help raise the candidate's confidence so that they're ready to think clearly for the next question and weed out a few bozos as a bonus.

Alright, I can get behind that. I don't think I've had an interview where I've been specifically pitched a softball like that, though. Most of what I've gotten (and what I prefer myself) is to pick a relatively easy (though not quite that easy) question and then iterate on it with them to make it harder.

FamDav
Mar 29, 2008

Sab669 posted:

Just curious, what determines if one is able to get security clearancces? Obviously it varies from level to level, but generally speaking.

I've never been in trouble with the law (sans speeding tickets :v:) and am a US Citizen, born and raised.

Ensign Expendable posted:

I'm a dual citizen with two foreign passports, plus the country I was born in no longer exists.

I had a pretty promising interview, with a defence contractor, too :(

In the first phase of information gathering they will ask you questions about if you have ever been a citizen of another country and if you have ever held dual passports. This is where you shouldn't lie and everybody will be hunky dory with the fact that you're a comrade by birthright.

From what I know of people from Canada with dual citizenship that received clearance, the only thing they had to do was renounce their dual citizenship and formally surrender their foreign passport. I imagine that you would have to do the same.

FamDav
Mar 29, 2008

Ensign Expendable posted:

Giving up a Russian citizenship is a colossal pain in the rear end, so sadly that's not an option.

While it might be an issue if you ever go back to Russia, I imagine the process of saying "Hey USA all the way, yankee doodle John Elway" and surrendering your Russian passport should be good enough for the US.

FamDav
Mar 29, 2008

Ithaqua posted:

That's not what TDD is. TDD is letting the code evolve by writing a single failing test, then writing just enough code to make that single test pass. Once you're done, you refactor the code to be pretty. As long as all your tests still pass, your code still works the way you originally wrote it and life is good.

Yeah, while knowing what TDD means specifically is good because it's a question that gets asked, you should really just focus on understanding different kinds of tests and when and why they are useful. Also, writing testable code should be a part of your thought process whenever you're coding.

FamDav
Mar 29, 2008

baquerd posted:

On the other hand, if you know what you're loving up you can avoid it in the first place. If you don't know what you're loving up, tests will not help you because you won't know what to test for. I'm a big fan of having a different programmer write the tests than coded the function.

Unit tests are an argument for extension and modification, not for initial development if they're being made by the same person writing the code.

Tests are still good to have around during research and development because as you find what you've been looking for you can add it to your test set.

Some tests are better than no tests for the next guy who has to deal with your (lovely) code, so there's no better time to be writing tests than right now.

FamDav
Mar 29, 2008
Honestly we only do a 24 hour coding problem and an on-site. The coding problem usually takes people about 8-10 hours to do (so they say) and is of sufficiently complexity that we can tell if someone is smart or not. After that on site is mostly getting a feel for the person and figuring out what their values are.

FamDav
Mar 29, 2008
So to clarify our entire process, we receive your resume and we look it over. If we like the alphabet soup on your resume, we get in contact and have a very informal chat, after which we tell you about your programming problem. You can receive it whenever you like, and the only rule is you get it back to us within 24 hours. It's a pretty good barometer for your algorithmic capabilities and your coding skills. Compared to any other place I've applied, it was far and away the hardest and the most interesting bit of code I had to write.

After that, if we're still interested we fly you out for an all day onsite. While we do ask a few algorithms questions here and there, this is primarily to learn more about what you've done, what you know, what you don't know, and how good of a fit you'll be. After you leave, we all sit down and decide if you're hire/no-hire and then you get a call.

As for our industry, we work on search-based optimization solutions.

FamDav
Mar 29, 2008

how!! posted:

Once I was given a problem where I had to basically make a simple CRUD app in Django.

Yeah our questions are more like "Write an AI for Yahtzee".

EDIT: I also don't think we're giving you a several restricted timetable with this problem, either. Can you afford to give up a Saturday afternoon to work on this? Great. If not, well too bad. We aren't really in need of a ton of new people coming in every year.

FamDav fucked around with this message at 19:51 on Dec 7, 2012

FamDav
Mar 29, 2008

how!! posted:

problem solved: https://github.com/dastbe/Yahtzee-AI

took me about 20 seconds

It took me about 20 seconds to find out you plagiarized your answer. Also, if you can't generate a reasonable solution to an optimization problem like this on your own then I don't know maybe you should just stick to writing CRUD apps.

FamDav
Mar 29, 2008

how!! posted:

I solve complex problems by finding an already existing solution, and leveraging that. If a company wants to call that "plagiarism", then gently caress 'em.

So if you take that solution, understand what it does, rewrite, send it in and then later explain what you actually did (algorithmically) and defend your choices then go for it. You would've found a similar solution in a few white papers that are freely available online, along with an optimal solution for Yahtzee that would've conveniently fit into our constraints.

Also lol if you think that guy spent more than a few hours researching and then maybe 10 or so hours implementing.

FamDav
Mar 29, 2008

shrughes posted:

That seems like a good way to discriminate against any candidate that has a family.

I would've thought that, but we've had a fair amount of people who have families that have done it and succeeded. We actually are pretty old if you took the average ages of employees here.

shrughes posted:

How long have you been working for your current employer?

Isn't this the guy who goes to a job, hates everything about their codebase, asks that they perform a complete rewrite, then leaves/is fired when they don't comply with his latent autism? You'd think he'd be really anal about writing his own code.

tk posted:

I guess I don't have any experience running a business, but this seems like a good attitude to have if you have no desire to attract talent.

Well like I said, at the moment we really don't need to hire more people. Sure we always want to hire more smart people so we can do new things, but it's not a pressing priority.

Also, we've found that the people who do well (here, elsewhere, everywhere) like the challenge aspect of it. Personally, I was impressed because it asked more of me than "Can you breath and type for 20-30 minutes?". As an example, a friend asked me if I wanted to interview at the startup he's working at; their "hardcore math problem" was basically a prime number sieve with a check in a loop for a particular condition. If you're setting the bar that low for getting my resume "to the top of the stack" then I don't really want to talk to you.

FamDav fucked around with this message at 23:16 on Dec 7, 2012

FamDav
Mar 29, 2008

BirdOfPlay posted:

I only ask cause that's how I've been coding recently due to working on Euler Problems where my assumption is that my gut solution will be inefficient.

Well, two things.

1) The critical part of an Euler problem is the entire problem

2) The Knuth quote isn't really about algorithmic efficiency, which is what you're focusing on when you do these Euler problems.

FamDav
Mar 29, 2008

how!! posted:

If you have a query that is slow, the only way to fix that problem is to tweak settings, or re-write your query.

What Shrughes is arguing is that having knowledge of the underly mechanics of the particular database will help you solve this problem, usually in a more efficient manner. Moreso, it allows you to rigorous prove your claim that your solution is really better than the rest.

Also, for everybody giving bad answers to the interview problem:

given list L, sort L. Let A,B be bidirectional iterations pointing to the first and last elements of L respectively. We then find if there exist two elements a,b in L such that a+b=c by:

code:
While *A < *B:
  if *A + *B = c then return (*A,B)
  else if *A + *B > C then B--
  else A++
end

return false
The binary search doesn't hurt your performance in terms of algorithmic complexity, but you don't have to.

FamDav
Mar 29, 2008

Null Pointer posted:

Computer Science degrees are useless because as far as I could tell the people I used to work with (before I got fired for incompetence) never used their degrees for anything. That's why I deserve a pass for not understanding basic theory, or even giving enough of a poo poo about my own field to pick up a copy of CLRS. Also, you know, CLRS is a really heavy book, and it's all the way on the top shelf, so it's totally unreasonable for you to expect me to learn any of it.

Sigh. Well, if you're going to insist on asking me a theory question, at least give me a few hours to look it up on Google first.

https://github.com/priestc/interview-crap/blob/master/hiring-outline.txt

FamDav
Mar 29, 2008

how!! posted:

I understand your point with the restaurant thing, but I don't need to change.

Best post of 2012.

FamDav
Mar 29, 2008

Ithaqua posted:

And before we end up with another multi-page debate on the subject: just loving ask when scheduling the in-person interview. Some places are expecting a suit, some places are expecting slacks and a button down shirt, some places are expecting a polo shirt and jeans. It never hurts to ask, and when in doubt opt for a suit.

I think that covered the entire debate, right guys? :)

Well, you forgot "and some places literally would prefer you come in wearing what you wear every day, so long as it's clean."

FamDav
Mar 29, 2008

Chasiubao posted:

If you bail, they'll probably make you repay anything they gave you for relocation (via a clause in your employment contract).

Good thing they aren't giving him much of anything for relocation.

FamDav
Mar 29, 2008

Strong Sauce posted:

glut of developers

It's the same as it always was: be good at what you do, get internships, get jobs where you do meaningful work -> lead a successful, fulfilling life. The reality is most people coming out of CS programs are somewhere between dumb as rocks and mediocre, it's just that now the mediocre don't have a guaranteed job out of school.

And as for languages, I wouldn't stress so much as long as you can demonstrate that you can pick up languages/frameworks/etc. quickly. Even if I were to hire you as just a front-end dev, your career growth will be severely limited by your inability to adapt. This advice is probably less applicable to very early stage companies who need expertise immediately, fwiw.

Similarly, if you can show proficiency in algorithms and architecting software then you should have no problem in this career. Both are rare skills and are rarer as a combination.

EDIT: I don't really get the tier whoring going on here. Yes, if you go to a school that is not in the top ~20 universities or liberal arts colleges it will be harder to get hired because people in that group have already cleared several hurdles showing they're qualified. The only time the quality of your CS department will really save you is if your school is otherwise poorly ranked, but that ranking usually corresponds to their graduate program (i.e. not your BA/BS).

FamDav fucked around with this message at 18:44 on Feb 1, 2013

FamDav
Mar 29, 2008

KNITS MY FEEDS posted:

More like "how would you implement an unordered_set?" after I mentioned an unordered_set. Generally, if I mentioned some data structure I've used, he'd ask me how it worked under the hood. I gave partial answers but I'm not optimistic.

e: Oh wow, I should've taken the hint when he gave me a question about hashtables after that one.

In my experience as an interviewee and my opinion as an interviewer, the only time when being unable to answer multiple technical questions during an interview will lead to a negative opinion is when it implies that you lied about your qualifications or you refuse to ask for help or make headway into the problem.

Honestly even if you say something like "Master C++ engineer" and you bomb my C++ quiz, so long as you make an effort to do well and you're willing to admit your limitations I wouldn't see it as an immediate negative.

FamDav
Mar 29, 2008

2banks1swap.avi posted:

My resume has EXPECTED GRADUATION FALL 2014 right there, and I tell them right off the bat. I still don't know how I should go about negotiating given that I won't be pulling 40h a week.

Well it sounds like you have real experience so you should be able to command the fraction of a full time salary that would correspond to your part time hours. If you expect there to be significant fluctuation in your week to week hours then you might want to consider hourly.

Honestly just tell them up front you will only work part-time and whether or not you will be working variable horus, have them give you an offer, and if it doesn't sound like it's worth your time then don't take it.

FamDav
Mar 29, 2008
gaz maybe you should get a job first before you start lecturing people about how getting a job works.

FamDav
Mar 29, 2008
Well, in the interest of fairness there is a real reason why companies try and look locally and that is because there is a greater chance of a local applicant accepting a job offer vs. non-local. I have to imagine the difference is also correlated to age and living situation.

If a company really won't consider non-locals then they either a) haven't been searching for very long b) have been burned by too many people wasting their time c) could care less about the quality of dev d) so cash-strapped they actually cannot afford to relocate you.

a/b are reasonable (though myopic) but c/d are just places you don't want to bother with in the first place.

Anyways, here's my advice to everyone.

1) Get a job at a company known for having a stringent interview process (Not necessary, but they usually have more interesting work to boot).
2) Do grunt work. Own it, do it well.
3) Do more interesting work. Involve yourself at the planning stage. Take on long-term projects and complete them.
4) Surprise! You can put that on your resume and everyone will want to talk to you.
5) Hopefully when you open your mouth you don't sound like a complete idiot.

step 0 is go to a top ~30 ranked uni/lac, have a good gpa, have high test scores (SAT,AP,IB,GRE,etc.), but even if you're like me and end up sick for 3 years you can still get back on track with these 5 steps.

WhatBigCSDoesn'tWantYouToKnow.docx

FamDav
Mar 29, 2008
Not a manager, but an interviewer nonetheless:

Having a track record of commits to a major open source project is like having an internship. Having a bunch of things on github gives me insight into your coding but other than that it doesn't tell me much.

What tells me a lot is when I ask you about something you've worked on in the last year you can competently talk to the point where I have to cut you off. Similarly, I care much more about achievements you've made outside of just programming (did you manage a team or oversee the refactoring of a major chunk of code) so I know you don't just want to be told what to do every day for the next 3 years.

Honestly, I get so much more out of reading through the response to our 1-day coding problem in terms of coding ability that I wonder why more companies don't do it.

FamDav
Mar 29, 2008

wide stance posted:

Speaking of coding problems, I'd recommend not necessarily counting on coding homework to be brought up during the followup interview, particularly if you do it well. For one job I thought I did pretty well on the main algorithm in the problem, O(n) when many would have had O(n^2), so I was pretty cocky and didn't prepare and got utterly...destroyed. The guy was fed up and even had me say code to him over the phone, which is a loving joke. And their product was stupid so whatever.

For another job I had a really bad O(n^2) bit of code somewhere and that's the only thing they brought up about it. So be prepared to answer to poor bits of code. In my defense it was a really long assignment and took like 8 hours, I was even the first person they used it on and they asked me how long it took me.

Describing code over the phone is ridiculous.

We have two people who vet the coding submissions. In order of worst to best we get

1) Trivial, exponential solution (You're writing a solver for a board game)
2) Same, but with some low level optimizations which don't really improve the runtime
3) Picks the right algorithm
4) Same, but with some low level optimizations (this usually only occurs in c or c++ code)
5) Same, but with novel optimizations we have yet to see.

Code quality will move you up or down a place in the rankings, but no more.

We'll most likely give 4s and 5s an easier interview process than a 3, and we rarely call in a 2. No matter, you will spend an hour with the same two people who vetted your code, half of which is devoted to you explaining your code, how you felt about the time you spent on it, and what your process was.

We used to do a 3-day problem (You wrote a solver for a board game plus a search algorithm for finding a highest scoring board) which is really too much for most, but I think the current process is just right.

imo this is much more effective and more fair than something like two 45 minute phone interviews, and usually takes the equivalent amount of time to validate (two engineers spending anywhere between 10 minutes to an hour looking at a body of code).

Anyways the takeaway is you should always be able to describe your work because how do I know you didn't copy it or implement something you read online without understanding it? If you can talk confidently, consistently, and correctly about what you gave us then you are almost definitely a hire.

FamDav fucked around with this message at 06:29 on May 1, 2013

FamDav
Mar 29, 2008
To third (or fourth?) what everyone has said, so long as you are making a serious counteroffer (and maybe have a competing offer from another co) the worst you'll hear is "No, we're only willing to do X." at which point you either take it or you leave it.

Good Will Hrunting posted:

My top choice rejected me after a screen, two interviews, and eight weeks of waiting. Pretty glad I took Offer A. Thanks, thread!

Any good company should not accept 8 weeks of lag time between interviews and decision, unless it's been explicitly declared upfront. Once you make contact with a candidate you should keep the process efficient and professional.

FamDav fucked around with this message at 01:10 on May 2, 2013

FamDav
Mar 29, 2008

Suspicious Dish posted:

Sounds like a "hot resume tip" a career counselor would give you.

This includes the five paragraph cover letter detailing your life's work and the overuse of action words?

I've seen "scrutinizingly maintained unit tests" before.

FamDav
Mar 29, 2008

Gazpacho posted:

This morning I had a conversation with a recruiter in which she casually mentioned "If [client] gets a candidate and doesn't see all 10s on the required skills, they ignore it." So there you go. If you are prepared to use some skill the first day on the job, don't be afraid to tell the recruiter that you're a 10. You do take the risk that an interviewer with a poor understanding of the recruiting process will reject you for calling yourself a "C++ 10" and not literally being Bjarne irrespective of what the company needs, but that's a risk worth taking compared to no interview at all. You can't help it if someone is playing catch-22 on company time.

I hope the recruiter wasnt pulling this out of their rear end because saying you're a 10 in something is hecka dunning-kreuger for me. Whenever we get somebody who says c++ expert i ask them if they feel they really are at an expert level and why. If they say yes, i ask them about 15 to 20 unambiguous questions and they usually get about a fourth right.

I don't care if you're bad at C++ because we can teach you. I care that you can be introspective enough to assess what you're actually good at and know what you don't know.

Adbot
ADBOT LOVES YOU

FamDav
Mar 29, 2008
i really like it when a candidate tells me about non-programming hobbies like hiking, biking, or baking because then there's a good chance they dont have a neckbeard, smell like socks, and wear a fedora.

so if you want to get your interviewers hopes up put that poo poo down.

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