Live data from Hacker News

Ask HN: I've been a programmer for 6 years, and I can't solve basic CS problems

news.ycombinator.com

281–290 of 309 posts

Re: Ask HN: I've been a programmer for 6 years, and I can't solve basic CS problems

#281
post #31

Thank you to everyone who has replied to my rant. I felt of low value for not being able to provide immediate help for most of the problems that she's being taught to work on. Some of the examples (since some of you were asking for them): https://github.com/cs50/docs/blob/master/_pages/2018/x/psets... https://github.com/cs50/docs/blob/master/_pages/2018/x/psets... I realise that I may have written my original post a…

I think you just need to brush up on data structures: https://www.geeksforgeeks.org/data-structures/ (There are probably better resources like HeadFirst or Khan Academy)

Most of the problems you've listed become easy the more familiar you are with data structures. This is a more common problem for anyone outside the SV/SF bubble and I wouldn't worry. Just start doing homework and you'll be fine.

Once you're done with data structures, I would start checking out design patterns: http://shop.oreilly.com/product/9780596007126.do

Hope it helps

Re: Ask HN: I've been a programmer for 6 years, and I can't solve basic CS problems

#282
post #121

Earlier quoted context omitted.

That crosses into personal attack. Please review the guidelines and don't do that here. https://news.ycombinator.com/newsguidelines.html

Every time I see a deleted comment and a reply like that, I get so morbidly curious what was said, and yet, I've _been_ a moderator on a forum, so I know for certain that reading it would never make my mood any _better_, just worse. Is this just me? I know it's self destructive to seek out negativity like that, but that curiosity just won't go away.

Just set "showdead" to "yes" in your profile and the fruit of the poisoned tree will be yours.

Re: Ask HN: I've been a programmer for 6 years, and I can't solve basic CS problems

#283
I would just start toying around with these problems, there's lots of sites out there that aggregate them for you (personally I like https://reddit.com/r/dailyprogrammer). Solving these kinds of problems really are different from your usual day to day on the job coding activities. I'm by no means the best at solving these things, but the more I do it the easier they are going forward. They are useful mostly just for fun or for preparing for interviews where people might do this crap to you. There's actually a yearly code challenge called Advent of Code (https://adventofcode.com/) that is starting in December that you can try (though they can be kind of tough). You basically just have to keep doing them and do harder and harder ones and it gets easier, your bag of tricks starts to grow and you realize "Oh, this problem is pretty similar to the problem I did last month, I'll start out with the same approach"

Re: Ask HN: I've been a programmer for 6 years, and I can't solve basic CS problems

#284
post #277

Okay, I'll give you the "triage" presentation. It's a combination of "where to start" and "what I've actually used in industry." 1) Algorithmic complexity: Study why naively adding to the end of an array or the end of a string results in O(n^2), while doubling the size when you increase the storage results in O(n). That one tidbit has comprised some embarrassingly large fraction of the "consulting" I used to do worki…

Could you explain why adding to the end of an array results in O(n^2)? From what I can find, it appears to be O(1). If you increase the size of the array by 1 each time and copy the old array elements over, wouldn't that be O(n) to copy the array plus the additional add, O(n+1) which is just O(n)?

Could you explain why adding to the end of an array results in O(n^2)?

If an operation does that n times, then it's O(n^2). It's very common for self taught programmers to write operations that do the naive addition many times. There have been entire consulting trips caused by basically that, including, so I heard, the one that brought a consultant into the Chrysler C3 project and sparked the invention of Extreme Programming.

Re: Ask HN: I've been a programmer for 6 years, and I can't solve basic CS problems

#285

Earlier quoted context omitted.

I think "mirror" is a more intuitive description of the problem, but essentially you reverse all of the left and right subtrees. This Quora question [1] has a few different approaches listed. [1]: https://www.quora.com/What-is-the-algorithmic-approach-to-in...

That doesn't sound like "inverting". If that is what it means then it is indeed a bad name. I always thought it means making one of the leaf nodes a root of the tree. Physically, it would look like taking one of the leaf nodes with your fingers and "hanging" the tree off of it.

invert: to reverse in position, order, or relationship

Re: Ask HN: I've been a programmer for 6 years, and I can't solve basic CS problems

#286
post #55

Earlier quoted context omitted.

As a self-taught programmer who doesn't have a CS degree, my experience has been that this is not a significant hurdle to any workplace that I would seriously consider applying.

As a self-taught programmer who doesn't have a CS degree, my experience is substantially different. There are many places where I would seriously consider applying (FAANG) that this would be a significant hurdle. I've taken to competitive programming as a way to prepare myself, but I'm a long way away from being at a level where I'm comfortable applying to the companies I'd like to work for. I think a lot of people l…

I think you may be selling yourself a little short.

Many, though perhaps not all, FAANG interviews do not involve needing to know THAT much CS trivia. The common topics (for many interviews, it depends on the company, and at non-homogenized companies, on the team) are:

- What’s a graph? What are some interesting strategies for walking a graph? Any gotchas to look out for?

- What is algorithmic complexity? How do you measure it? Why does it matter?

- Are you conversant with middle-school level arithmetic and geometry?

- Can you describe the strengths and weaknesses of the 4-5 most common simple data structures?

- Can you listen to problems as they’re described, and ask good clarifying questions (the most common problem is here, people didn’t bother to take the time to ask clarifying questions)?

- Once you’ve nailed down the problem, can you structure a few nested for-loops with relevant tests and perhaps a few simple auxiliary data structures?

- Once you have a potential solution, do you test your work? Do you skip over your mistakes pretending they don’t exist? Do you take hints when your mistakes are pointed out to you?

- Do you admit when you don’t know, then try exploring anyway?

Seriously, this is the entirety of what I see most FAANG interviews covering. If you’re a competent self taught programmer, you need to study a tiny bit about data structures and algorithms, stay calm, ask lots of questions, and just execute.

I get that there are lots of horror stories out there, and I genuinely feel for people who get super anxious when asked to work with an audience.

But if anxiety isn’t your problem, I encourage people to try different teams/companies if they’ve mastered what I’ve listed. FAANG really don’t want to put the bar absurdly high, they want a relatively easy level of CS knowledge.

Re: Ask HN: I've been a programmer for 6 years, and I can't solve basic CS problems

#287

Honestly, I'm appalled by some of the stories being shared in this thread; smug interview panels pressure-cooking candidates as they try to whiteboard obscure CS gotchas is a system perfect only for assholes and masochists. I've now run three tech companies and hired dozens of developers by having really intense, thoughtful conversations with them. I asked them to tell me war stories and encouraged them to share insi…

Amen, 100% this. Same methods here, same success rate.

I just had a long conversation this afternoon with a friend who manages a tech recruiter team and she was telling me how frustrating it is working for cash-strapped early stage startups who pass on perfectly talented & experienced candidates open to taking a salary hit - because they, in their inexperience, cannot fathom how to interview without subjecting candidates to a series of dehumanized and impossible puzzles that are only solvable by people who have dedicated themselves to puzzle solving.

Meanwhile established companies with deeper pockets, such as banks, scoop up these candidates to do humdrum back office software work because they use tried and true interviewing methods.. like talking to candidates.

I attribute most of the issue to inexperience on the hiring managers' part and pressure to hire only the "best of the best" from leadership. Coupled with developers' personal insecurities, lack of education on the fundamentals of management, echo chamber noise around code test culture and the incessant desire of engineers to abstract away any human elements of their work, the process has devolved into a toxic mess when it comes to recruitment and interviewing.

Hopefully the situation can be fixed at some point. But until then, I'll keep on scooping those 10xers by trading war stories over the phone, thank you very much...

Re: Ask HN: I've been a programmer for 6 years, and I can't solve basic CS problems

#288
post #107

Earlier quoted context omitted.

Good for you, but your interview experiences would be atypical these days

Right. Having my own companies and hiring people over the last 20 years has jaded me. lol

you most definitely seem to be. i’ve both had and seen interviews requiring solving by hand various encryption algs using only a whiteboard. maybe you don’t require it but there are plenty of places that do

Re: Ask HN: I've been a programmer for 6 years, and I can't solve basic CS problems

#289

Earlier quoted context omitted.

Where do you find jobs to apply to? I am also a self-taught programmer without a CS degree, and it seems that a surprisingly large portion of companies use obtuse algo/whiteboarding interview questions. My objection is less that I don’t know or can’t learn them and more that it seems like a waste of time to prep for stuff that isn’t useful.

Those companies aren't hiring , they are just sifting market for rock starts. I have seen this in numerous places already — when a company has enough product leaders, but still enough money/time to hire a couple more, they begin whiteboarding people. Several years later those product owners will leave, and suddenly the interviews are reduced to "you worked with ? Know what is? Accepte^W erm, I mean we will contact yo…

this is false, you can’t blanket companies like this. the job i’m currently at required me to find all palindromes in a set of strings. the company makes media management software.

Re: Ask HN: I've been a programmer for 6 years, and I can't solve basic CS problems

#290
post #31

Thank you to everyone who has replied to my rant. I felt of low value for not being able to provide immediate help for most of the problems that she's being taught to work on. Some of the examples (since some of you were asking for them): https://github.com/cs50/docs/blob/master/_pages/2018/x/psets... https://github.com/cs50/docs/blob/master/_pages/2018/x/psets... I realise that I may have written my original post a…

Seems like the sibling comments have already doled out the tough love. All I can add is that I'm in a similar boat, having worked for a long time and now back at university to finally check out my degree... The material is much, much more challenging than I would have thought. Which is disheartening because I have so many years of experience and thought I knew most of what there is to know... So eh, don't give up! Working on those homework problems with your fiancee is a great opportunity to learn more.
Post reply on HN