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
Good Will Hrunting
Oct 8, 2012

I changed my mind.
I'm not sorry.

Sitting Bull posted:

I recently finished a 2 year diploma program focused on programming mostly, and I'm trying to go over some practice exercises. It took me about a day to do make a simple recursive string matching tool(with any number of wildcards), and a recursive 'print all permutations of a string'. Then it took me pretty much all day today to make very little progress on a minimax recursive tic tac toe AI, and even less progress on an A* grid search tool. The reason why I'm doing these exercises is that I've been told by people who have conducted many interviews that these are simple warm up programming questions for serious interviews.

My question: How dumb am I? I feel like I'm struggling with really really simple concepts, and should maybe either take another (remedial) programming class, or look to a different career path. I'm just incredibly frustrated by my lack of progress, and I'd like to have somebody unbiased towards me just tell me straight up if I'm wasting my time.

It's been mentioned in this thread but everyone will ask themselves these types of questions. Keep in mind that nobody started as a good developer (I'm still not, but I keep working at it) and a lot of this is persisting through difficult problems. You will get so much better at solving these types of things, I promise you. Just keep at it. If you ever find yourself saying "The struggle and time spent isn't worth the outcome to me anymore" then you are not meant to be a programmer.

Adbot
ADBOT LOVES YOU

Thom Yorke raps
Nov 2, 2004


Sitting Bull posted:

I recently finished a 2 year diploma program focused on programming mostly, and I'm trying to go over some practice exercises. It took me about a day to do make a simple recursive string matching tool(with any number of wildcards), and a recursive 'print all permutations of a string'. Then it took me pretty much all day today to make very little progress on a minimax recursive tic tac toe AI, and even less progress on an A* grid search tool. The reason why I'm doing these exercises is that I've been told by people who have conducted many interviews that these are simple warm up programming questions for serious interviews.

My question: How dumb am I? I feel like I'm struggling with really really simple concepts, and should maybe either take another (remedial) programming class, or look to a different career path. I'm just incredibly frustrated by my lack of progress, and I'd like to have somebody unbiased towards me just tell me straight up if I'm wasting my time.

I'm a programmer and I do interviews. I've done them for a large company and a startup, and I hire co-ops, fresh grads, and experienced developers. I have never asked anyone to to do those sorts of things. My interview questions vary but they mostly range from fizzbuzz (gets a lot of people) to designing an Iterator that basically does a lazy flatten on an Iterator of Iterators. Oh and fibonacci because enough people don't get it.
If you're worried about stuff like this, read an algorithms book. I'm sure someone in here has a good suggestion. Or read SICP and do that online course from MIT. Most of the time people aren't too worried about your complex algorithm knowledge and more ability to work hard and understand complicated things, hopefully quickly. Also build logical systems. We spend much more time asking candidates about experience and the process of building software than the specifics of implementing a code snippet.

School of How
Jul 6, 2013

quite frankly I don't believe this talk about the market
Of all the programmers that I've worked with, the two that were actually worth a drat, had at least a few projects they've built on their own on a github account of some sort. All the other guys had nothing to show for themselves.

Yes its possible that someone could be a great programmer without ever having built a project on their own, but that is very rare. If you really are such a great programmer, then whats stopping you from spending a few hours to build a project to put on github? I wrote weedprices.biz in less than 24 hours. Some other projects I've built in similar timeframes. Of course, I'm able to build stuff and get them out the door quickly because I do that kind of thing all the time. My first project certainly didn't take a week.

That said, 99% of programmers out in the wild have a blank github account. So to say you need a github account to get a job is wrong. It should be true that if you don't have anything in your github account you are unhhirable, but alas that is not the case.

Seriously, if you can sit down and build a tinyurl or tumblr or pastebin clone and successfully deploy it, that puts you in the top 1% of software engineers out there. If I'm hiring engineers and you have at least that to show me, you're hired on the spot. Unfortunately the software engineering industry as a whole doesn't see it that way.

Cicero
Dec 17, 2003

Jumpjet, melta, jumpjet. Repeat for ten minutes or until victory is assured.

Good Will Hrunting posted:

How would anyone just be into programming for money anyway? What a lovely road to go down just for the money. Work in business or something where you can bullshit your way to the top. This poo poo can get pretty stressful if you don't like it.
Why wouldn't you do programming for money? It's a job where your co-workers are generally intelligent, your skills are in-demand enough to where you can't be treated too poorly, hours are reasonable, work is intellectually stimulating, and of course the pay is quite good. Now's the point where someone takes issue with one of these because their job is actually a nightmare unending, but really for a white-collar job programming is excellent, on average.

Cicero fucked around with this message at 04:55 on Aug 7, 2013

no_funeral
Jul 4, 2004

why

Bognar posted:

It depends on the interview and the job. If you're trying to get a senior dev position at Big Company X, then those kinds of questions are probably par for the course. There are, however, a ton of places that might just hire you on the spot if you tell them you're writing a recursive string matcher in your spare time.

A blindingly large amount of (decent-paying) jobs out there are in web dev, and that's often as difficult as inserting [Form Element A] into [Database Slot B].

Ranma posted:

I'm a programmer and I do interviews. I've done them for a large company and a startup, and I hire co-ops, fresh grads, and experienced developers. I have never asked anyone to to do those sorts of things. My interview questions vary but they mostly range from fizzbuzz (gets a lot of people) to designing an Iterator that basically does a lazy flatten on an Iterator of Iterators. Oh and fibonacci because enough people don't get it.
If you're worried about stuff like this, read an algorithms book. I'm sure someone in here has a good suggestion. Or read SICP and do that online course from MIT. Most of the time people aren't too worried about your complex algorithm knowledge and more ability to work hard and understand complicated things, hopefully quickly. Also build logical systems. We spend much more time asking candidates about experience and the process of building software than the specifics of implementing a code snippet.

Good Will Hrunting posted:

It's been mentioned in this thread but everyone will ask themselves these types of questions. Keep in mind that nobody started as a good developer (I'm still not, but I keep working at it) and a lot of this is persisting through difficult problems. You will get so much better at solving these types of things, I promise you. Just keep at it. If you ever find yourself saying "The struggle and time spent isn't worth the outcome to me anymore" then you are not meant to be a programmer.

Thank you all for the replies, you've saved me from a potential mental breakdown(not seriously, but maybe seriously). I've just been getting incredibly frustrated trying to do these exercises, especially in Javascript where I can't use trees, queues, or real classes, and felt as if I'm having difficulties with things that should be simple tasks after two years of school.

I think I just need to get a good sleep, and come back to them with a fresh head.

bonds0097
Oct 23, 2010

I would cry but I don't think I can spare the moisture.
Pillbug

DAT NIGGA HOW posted:

Of all the programmers that I've worked with, the two that were actually worth a drat, had at least a few projects they've built on their own on a github account of some sort. All the other guys had nothing to show for themselves.

Yes its possible that someone could be a great programmer without ever having built a project on their own, but that is very rare. If you really are such a great programmer, then whats stopping you from spending a few hours to build a project to put on github? I wrote weedprices.biz in less than 24 hours. Some other projects I've built in similar timeframes. Of course, I'm able to build stuff and get them out the door quickly because I do that kind of thing all the time. My first project certainly didn't take a week.

That said, 99% of programmers out in the wild have a blank github account. So to say you need a github account to get a job is wrong. It should be true that if you don't have anything in your github account you are unhhirable, but alas that is not the case.

Seriously, if you can sit down and build a tinyurl or tumblr or pastebin clone and successfully deploy it, that puts you in the top 1% of software engineers out there. If I'm hiring engineers and you have at least that to show me, you're hired on the spot. Unfortunately the software engineering industry as a whole doesn't see it that way.

Excuse me if I'm mistaken but you seem to be assuming we're all web developers. If you write software for embedded systems, or do systems programming, or any number of other disciplines aside from Web Programming, what you're talking about isn't all that relevant.

School of How
Jul 6, 2013

quite frankly I don't believe this talk about the market

bonds0097 posted:

Excuse me if I'm mistaken but you seem to be assuming we're all web developers. If you write software for embedded systems, or do systems programming, or any number of other disciplines aside from Web Programming, what you're talking about isn't all that relevant.

I don't know poo poo about embedded programming, but there must be some kind of analog for open source development in that world.

Z-Bo
Jul 2, 2005
more like z-butt

Gazpacho posted:

Z-Bo, you said that use the github link field to weed people out and I took you at your word. I don't have anything to add.

I did not phrase it clearly. I was attempting to analyze the motives for someone else's job description.

By analogy, we put vaguely similar things in our job description -- we emphasize autonomy, bringing your favorite tools and patterns, etc. We try to make it very clear that we move at a fast pace. We did a market survey for our job description. The #1 complaint we get about our job description is: "I am not sure what I would do there, and what my responsibilities would be." In some sense, that is the perfect feedback, because we want to attract the kind of person who intuitively sees needs and fills them in ways that not only close gaps in functionality, but completely re-envision how our product should be used.

It's extremely important programmers understand our culture before joining. Here are our hiring statistics: 6 developers who have quit, did so in the first two weeks. One left a note, saying, "I don't think I am as good as you think I am." He didn't even bother to pick up his stuff. 12 other developers are still here. The job description and the interview process try to weed out as many bad fits as possible, and I am not really sure why people join and quit right away, but I would guess many developers are co-dependent and don't know freedom, want to see what it is like, see it, and hate it. When I worked at Fidelity, I literally went home so stressed out one day because every other developer was incredibly co-dependent and dragging me down, I had to repeat myself 8 times to get them to do something simple, and some times I would have to sit down with them and show them how to do it.

Have you ever read Zach Holman talk about Scaling GitHub's culture, and how some people say it isn't scalable?

Z-Bo
Jul 2, 2005
more like z-butt

bonds0097 posted:

Excuse me if I'm mistaken but you seem to be assuming we're all web developers. If you write software for embedded systems, or do systems programming, or any number of other disciplines aside from Web Programming, what you're talking about isn't all that relevant.

Let me show you my Arduino Google Docs File Server!

Good Will Hrunting
Oct 8, 2012

I changed my mind.
I'm not sorry.

Cicero posted:

Why wouldn't you do programming for money? It's a job where your co-workers are generally intelligent, your skills are in-demand enough to where you can't be treated too poorly, hours are reasonable, work is intellectually stimulating, and of course the pay is quite good. Now's the point where someone takes issue with one of these because their job is actually a nightmare unending, but really for a white-collar job programming is excellent, on average.

You list some great reasons for going into programming, but my comment was geared towards someone looking to go into work for a paycheck, not necessarily concerned with career progression, stimulation, or contribution. A lot of people I know do this. They're accountants or in "media" and I question how they haven't offed themselves yet. I worded my comment poorly, but I meant that programming probably isn't the right fit for someone looking to coast through their days while waiting for nights, weekends, and payday.

JawnV6
Jul 4, 2004

So hot ...

Z-Bo posted:

1) I've worked with people before who only do programming to pay the bills. It is absolutely awful.

What asinine bullshit. How this reads to me is that you're working on very small problems. You can take <=20 developers cut from the same challenge-driven cloth and have enough interesting new problems to sic them on that they won't get bored and just stop. From later in the thread, it's no surprise you're having to rewrite on a yearly basis, nor that you don't see this as a problem.

I used to work on engineering problems that took 500 people 5 years to do. You can't corral a bunch of cowboys for that long, nor consistently point them in the same direction even if the former problem was solved. At a certain point, you have a huge volume of 'boring' work that you need to give salaried guy with a family to get home to. The cowboy wouldn't sit there and do it, they'd invent some meta-problem and take 3 weeks to come up with a glorious solution to save 2 week's effot. And the family coder is happy to do that work, take their paycheck, and leave at 5.

If you're solving problems with a team consisting entirely of challenge-driven people, you're in a small problem space with rapidly shifting requirements. The entirety of the discipline is not contained within those problem spaces.

Hiowf
Jun 28, 2013

We don't do .DOC in my cave.

Sitting Bull posted:

I've just been getting incredibly frustrated trying to do these exercises, especially in Javascript where I can't use trees, queues, or real classes...

Say what? I think the above's a misunderstanding you have to fix before resuming the exercises. Trees and queues are perfectly implementable, even without much hassle. "Real classes" is a bit vague and being prototype based makes JavaScript have some differences there, but basically anything you want to do should be possible.

You should be able to implement basic data-structures that the default library doesn't offer before trying to do the exercises you described. Without them, it's going to be painful and probably bad code.

quote:

and felt as if I'm having difficulties with things that should be simple tasks after two years of school.

I think the experience from people in the industry is that even students that finished 4 year degrees will typically have 0 programming ability if they didn't do some in their free time. That's the reason people still use things like FizzBuzz.

So your situation is normal and you're on the right path to fix it.

Hiowf fucked around with this message at 08:01 on Aug 7, 2013

no_funeral
Jul 4, 2004

why
Thanks. I have implemented many of the main data structures from the ground up in Java, in the data structures course I took, and I'm confident I could do so again(after reviewing my notes). It was just sort of a compounding frustration which those contributed to.

Pilsner
Nov 23, 2002

Sab669 posted:

"Well, when I was in college I was working 2 jobs, and class full time, so I had little time for pet projects. Since graduation I've been working full time and as much as I love to code, after staring code for 8 hours per day my eyes feel like they're going to explode." is usually my go-to response when the topic of github/projects comes up. I think it's a good answer instead of just saying "I don't have one" :shrug:
This is a completely reasonable attitude to have, but from my own experience, the best devs I know also do some code in their spare time. They don't do it as a second job, but out of interest of solving problems now and then. It could be a coincidence of course.

As for myself, I don't really code at home just for the heck of it, but when I stumble upon an annoyance or feel a need for a little app, I write it. That's when I really, really love being a developer. Still, I write perhaps one application or tool per year on average. I also greatly utilize the fact that I know scripting and automation to make quick work of stuff like mass video encoding, code generation, etc.

I don't want any aspiring programmer to think that they should force themselves to sit down and write some personal projects in order to put on Github. That will only lead to frustration, because forced work sucks. You should find the motivation from wanting to solve a problem or annoyance you're having, else it's hopeless.

bonds0097 posted:

Excuse me if I'm mistaken but you seem to be assuming we're all web developers. If you write software for embedded systems, or do systems programming, or any number of other disciplines aside from Web Programming, what you're talking about isn't all that relevant.
What about general application development? Like a Windows application? That's the easiest development there is, you don't even need to fuss with setting up a web server and such.

Tunga
May 7, 2004

Grimey Drawer
I have an interview this afternoon for an Android dev role, it's exactly what I want but it sounds like they're looking for someone more senior than me. I'm six years out of uni with a BSc in CS (UK) and have been working at a software company ever since as the only technical person in a 4-7 man sales office, doing customer support, custom projects, product triage, prioritisation, some internal IT, and recently a bit of actual product dev. Our HQ is in Seattle so I work with them a lot to make sure the UK arm gets what it needs. I know our software and industry inside out, unfortunately it's kind of niche (mail sortation/data quality) and I really want to get into mobile dev.

I've written quite a lot of code during that time, mostly on bespoke projects for customers which I specced, designed, wrote and supported from scratch. Nothing huge, maybe 2-3 thousand lines at most. But it was 95% done in C# because we were a complete Windows shop.

Some concerns I have are that I haven't used Java much since university, I've only been messing around with Android for a couple of weeks, and most of my coding experience has been solo projects without very much code review. I feel like I make bad architectural decisions because nobody has ever been there to say "hey, do it this way instead".

Obviously I can try spin this in a positive way: I had to teach myself C#, I'm well practised at find solutions to problems by myself, and I'm good at working on ten different things at once if needed.

I got this interview through a friend who works there so I'm keen to impress. It's the first interview I've had in five and a half years and only my third interview ever (and the one for my current job contained almost zero technical questions because my boss is the sales manager), so I'm pretty sure the guy is going to ask me some question about trees or something that I've had no reason to use for the last five years. Welp.

Something I'm not really sure about is salary. I earn £35k right now but I have a lot saved up and I don't really care about money as much as I do getting a job that I enjoy. I would happily take a pay cut to get something in mobile dev but people tell me that I shouldn't ever take a pay cut. I hate that everything is so money focused. Admittedly those people are mostly non-technical so I'm hoping it's fine if I say "I earn this much, I'd be happy with the same, but also that isn't my motivation here so I wouldn't want that to be a sticking point."

Edit: here's my CV:
https://docs.google.com/document/d/1oqRJjLOvdQjEvfIbjfijNMx7zhOYHhc-SZ7EwcaRrl4/edit?usp=sharing
Yeah, this isn't exactly anonymised since it's on my Drive but whatever.

Tunga fucked around with this message at 11:06 on Aug 7, 2013

WeezerToon
Sep 25, 2011

astr0man posted:

I've never actually seen anyone use FizzBuzz in an interview, because it's been talked about so many times I just naturally assumed it's the one interview programming question literally everyone knows a proper solution for.

edit:
Also this is the best fizzbuzz answer (by another goon):
https://gist.github.com/natw/4079502

That's an unbelievably efficient way to do it! How on earth did they come up with that seed number?

Hiowf
Jun 28, 2013

We don't do .DOC in my cave.

Tunga posted:

Some concerns I have are that I haven't used Java much since university,

Doesn't sound like a problem, especially considering your resume. You'll likely remember quickly or be able to look up anything you might have forgotten.

quote:

I've only been messing around with Android for a couple of weeks, and most of my coding experience has been solo projects without very much code review. I feel like I make bad architectural decisions because nobody has ever been there to say "hey, do it this way instead".

Does the new company do code reviews? If no, again not a real worry. Realize also that generally there's less people architecting designs than implementing it, so its normal to have less architecting than implementation experience.

If you gently caress up the architecture you're ruining it for everyone after you, so having some self-doubt there is okay.

quote:

Admittedly those people are mostly non-technical so I'm hoping it's fine if I say "I earn this much, I'd be happy with the same, but also that isn't my motivation here so I wouldn't want that to be a sticking point."

Bah, that's more or less loudly signaling you're ok with them giving you a pay cut, though. Can probably just say you're happy with something similar - if they think it's too much they can still lower it. Or offer a bit more.

Then again, low-balling someone who's to be an Android developer is something that can backfire easily, because it's not like there's a lack of demand these days. I wouldn't really expect a sane company to do that.

Hiowf
Jun 28, 2013

We don't do .DOC in my cave.

WeezerToon posted:

That's an unbelievably efficient way to do it! How on earth did they come up with that seed number?

Brute-force searching about 4^15 possibilities? Quite doable.

Tunga
May 7, 2004

Grimey Drawer

Skuto posted:

Bah, that's more or less loudly signaling you're ok with them giving you a pay cut, though. Can probably just say you're happy with something similar - if they think it's too much they can still lower it. Or offer a bit more.
I guess I'm just concerned that my current salary is too high to represent what I can offer a different company. I am really valuable to my current employer but a lot of the knowledge doesn't transfer because it's industry specific. Royal Mail postal regulations do not help me write good Android apps, basically.

I don't want to lose this position because I way overshoot what they would reasonably pay me. But I also appreciate that inviting someone to pay you less doesn't look good either.

Urgh, I hate money.

astr0man
Feb 21, 2007

hollyeo deuroga

Skuto posted:

Brute-force searching about 4^15 possibilities? Quite doable.

Yeah he brute forced it.

Bognar
Aug 4, 2011

I am the queen of France
Hot Rope Guy

WeezerToon posted:

That's an unbelievably efficient way to do it! How on earth did they come up with that seed number?

I ran the code out of curiosity, but I didn't get the correct result for Fizz Buzz. The random implementation is dependent on version (doesn't work on 2.7.2).

Upon further inspection, it seems to work on 2.7.4+.

astr0man
Feb 21, 2007

hollyeo deuroga
It works for me in 2.6 and all the 2.7 versions I've tried it in. Not sure what the particular issue with 2.7.2 is.

Here's the original poster's discussion of it (it came from the coding horrors thread).
http://forums.somethingawful.com/showthread.php?threadid=2803713&pagenumber=451&perpage=40#post415644908
There's some talk about the random number generator used in python on the following page.

edit:

bonds0097 posted:

Excuse me if I'm mistaken but you seem to be assuming we're all web developers. If you write software for embedded systems, or do systems programming, or any number of other disciplines aside from Web Programming, what you're talking about isn't all that relevant.
http://forums.somethingawful.com/showthread.php?threadid=3376083&userid=182061

astr0man fucked around with this message at 14:03 on Aug 7, 2013

WeezerToon
Sep 25, 2011

astr0man posted:

It works for me in 2.6 and all the 2.7 versions I've tried it in. Not sure what the particular issue with 2.7.2 is.

Here's the original poster's discussion of it (it came from the coding horrors thread).
http://forums.somethingawful.com/showthread.php?threadid=2803713&pagenumber=451&perpage=40#post415644908
There's some talk about the random number generator used in python on the following page.

edit:

http://forums.somethingawful.com/showthread.php?threadid=3376083&userid=182061

Cool, thanks for that! I'm guessing you wouldn't actually use that in an interview setting because: firstly, it'd be pretty obvious you just memorised it and weren't solving it on the spot. Secondly, if they ask you to show how you generate the seed number you'd have to explain that you bruteforced it overnight!

astr0man
Feb 21, 2007

hollyeo deuroga
If I was an interviewer and you showed me that and explained how you wrote the script to brute force finding the seed, I would still be impressed/satisfied.

The whole point of questions like FizzBuzz isn't to make sure that you can write a for loop with if (divisible by 3)/elif (divisible by 5) plus the extra if (divisible by both) clause, it's to see your overall thought process and how you approach a problem. If you wrote a script to brute force finding the random seed, you obviously understand the problem and are able to find a unique and interesting solution, which is what I'm looking for as the interviewer.

Bongo Bill
Jan 17, 2012

Z-Bo, out of curiosity, what is your company?

Steve French
Sep 8, 2003

Pilsner posted:

I don't want any aspiring programmer to think that they should force themselves to sit down and write some personal projects in order to put on Github. That will only lead to frustration, because forced work sucks. You should find the motivation from wanting to solve a problem or annoyance you're having, else it's hopeless.

This is what is amusing to me: people in this thread telling others that they should have a GitHub profile with personal projects on it so that they can get a job because some companies value that highly because it is an indicator of someone who doesn't just code for a paycheck... which is sort of what a job is...

bonds0097
Oct 23, 2010

I would cry but I don't think I can spare the moisture.
Pillbug

What am I supposed to be looking at here?

astr0man
Feb 21, 2007

hollyeo deuroga

bonds0097 posted:

What am I supposed to be looking at here?

how!! is dumb and you shouldn't respond to his posts.

bonds0097
Oct 23, 2010

I would cry but I don't think I can spare the moisture.
Pillbug

astr0man posted:

how!! is dumb and you shouldn't respond to his posts.

Ah, my bad. I did not make the username connection.

Che Delilas
Nov 23, 2009
FREE TIBET WEED
I enjoy programming. I enjoy computational problem solving. It's challenging and stimulating and I get to create stuff for a living. Passionate? That's a pretty nebulous term but I suppose; I do get pretty psyched when I learn some new, better way of doing a thing or I solve a particularly difficult problem.

After programming for 8 hours a day, 5 days a week, the LAST thing I want to do when I'm home is program. This means my GitHub is going to be rather empty.

Job seekers: don't feel bad if programming is not the #1 activity in your life. Some companies may weed you out because you don't spend your precious free time doing what you do at work. That's a good thing because they wanted you to spend 14 hours a day at the office and detected that you wouldn't be willing to do that. Bullet dodged.

Cicero
Dec 17, 2003

Jumpjet, melta, jumpjet. Repeat for ten minutes or until victory is assured.
I just noticed how!! got banned replying to one of my posts in this thread, and it was even an earnest, non-terrible post on his part that apparently got him banned (although maybe the ban was actually for earlier posts). Sorry how!!, RIP.

Tunga
May 7, 2004

Grimey Drawer
My interview went pretty well I think. Thanks for all the tips and replies in this thread!

They asked me to do Quick Sort on a whiteboard which I think I remembered correctly!

seiken
Feb 7, 2005

hah ha ha

Sitting Bull posted:

I recently finished a 2 year diploma program focused on programming mostly, and I'm trying to go over some practice exercises. It took me about a day to do make a simple recursive string matching tool(with any number of wildcards), and a recursive 'print all permutations of a string'. Then it took me pretty much all day today to make very little progress on a minimax recursive tic tac toe AI, and even less progress on an A* grid search tool. The reason why I'm doing these exercises is that I've been told by people who have conducted many interviews that these are simple warm up programming questions for serious interviews.

None of these problems are super super difficult, but they certainly aren't easy either. If you haven't programmed tricky algorithms like this before it'll certainly take you a long time, but you'll get better pretty quickly if you have good fundamentals.

Also, this is certainly like the top-end of difficulty as far as things you'd get asked at an interview go.

Edit: didn't realise there was another page of answers to this.

Tres Burritos
Sep 3, 2009

Tunga posted:

They asked me to do Quick Sort on a whiteboard which I think I remembered correctly!

God I hope that I never get a question like that. I've never gotten one that's just "You need to have memorized this thing".

no_funeral
Jul 4, 2004

why

seiken posted:

None of these problems are super super difficult, but they certainly aren't easy either. If you haven't programmed tricky algorithms like this before it'll certainly take you a long time, but you'll get better pretty quickly if you have good fundamentals.

Also, this is certainly like the top-end of difficulty as far as things you'd get asked at an interview go.

Edit: didn't realise there was another page of answers to this.

I still appreciate the answer, thank you.

Good Will Hrunting
Oct 8, 2012

I changed my mind.
I'm not sorry.

Tres Burritos posted:

God I hope that I never get a question like that. I've never gotten one that's just "You need to have memorized this thing".

I've gotten Fibonacci for 5+ interviews which makes me perplexed because it's very easy to solve and even easier to memorize.

Bognar
Aug 4, 2011

I am the queen of France
Hot Rope Guy

Good Will Hrunting posted:

I've gotten Fibonacci for 5+ interviews which makes me perplexed because it's very easy to solve and even easier to memorize.

Fibonacci is in the same category as Fizz Buzz - it's a quick, effective filter to weed out the idiots.

That said, I always liked dividing Fibonacci up into 3 categories:

Easy - Provide an iterative solution to give the nth Fibonacci number
Medium(ish) - Provide a recursive solution to give the nth Fibonacci number
Hard - Provide a recursive solution to give the nth Fibonacci number in sub-linear time

Safe and Secure!
Jun 14, 2008

OFFICIAL SA THREAD RUINER
SPRING 2013

Bognar posted:

Easy - Provide an iterative solution to give the nth Fibonacci number
Medium(ish) - Provide a recursive solution to give the nth Fibonacci number
Hard - Provide a recursive solution to give the nth Fibonacci number in sub-linear time

Isn't the recursive solution easier than the iterative solution?

Che Delilas
Nov 23, 2009
FREE TIBET WEED

Safe and Secure! posted:

Isn't the recursive solution easier than the iterative solution?

Depends on how comfortable you are with recursion. Since the previous poster categorized this problem as on the level of FizzBuzz, he's making the point that it's a test to see if you are familiar with a fundamental concept of programming.

Adbot
ADBOT LOVES YOU

Bognar
Aug 4, 2011

I am the queen of France
Hot Rope Guy
I would say the iterative and recursive solutions are just as easy in terms of difficulty. However, recursion is slightly more advanced than standard iteration and, sadly, a lot of people can't properly grasp it.

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