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

131–140 of 309 posts

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

#131
My brain no longer works that way either, I started getting sick of the same standard code tests asked at interviews while I was a developer (Please write a palindrome detector, please write a function to reverse these sets of numbers).

My point is - computer science teaches you to understand the core of what computing is about, but don't for a second think that much of it relates to real world experience.

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

#132

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.

Inverting means inverting the sort order. The easy answer is to encapsulate the tree in a new structure and add a Boolean flag called “inverted,” since you’re just reinterpreting the meaning of left and right children.

What you describe is called “rotation,” and is used to rebalance.

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

#133
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…

Wtf? The second problem, listed after the Caesar cipher, is to reverse the hashing algorithm used for passwords on Linux. What? How is that even remotely fair to ask as a challenge alongside something like the caesar cipher? One of these is a children's task while the other is a professional cryptographer's task. Am I missing something here? I'm sure it must not be terribly hard to do, but it's still so disproportion…

You're not reversing anything first off, it looks like you're just call crypt(3) with every potential password since they put a five character cap on it. 600M or so combinations, so pretty trivial, but feels fun. I'm actually all for this assignment, it makes you feel all hacker typer.

Secondly, it's DES. DES hasn't been viable for almost two decades now.

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

#134
post #43
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…

The examples you gave are very helpful in giving more context. I'm guessing that you're productive in your job, because you know the details of how to use language ABC, framework XYZ and the various patterns for solving common industry problems using ABC and XYZ. The part you seem to be weak in, is abstract problem solving. Ie, coming up with a pseudo-code algorithm that will accomplish some abstract goal that you've…

Good job in putting it tactfully. I think you have it exactly right, there's a different skillset used in interviewing often, abstract problem solving - that really is different than the skills to write a crud app.

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

#135
post #82

"The first lesson is that computational complexity theory is really, really, really not about computers. Computers play the same role in complexity that clocks, trains, and elevators play in relativity. They're a great way to illustrate the point, they were probably essential for discovering the point, but they're not the point. The best definition of complexity theory I can think of is that it's quantitative theolog…

I thought complexity theory was based on the fairly intuitive Turing machine model (of computation) and not religious concerns

Ideal Turing machines, god, what's the difference?

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

#136
post #105

Earlier quoted context omitted.

but even terribly performing applications can be "worked around" and thus scaled higher. [...] How can we achieve this? By monkeying with the dataset, queueing and batching operations, invalidating operations that take too long, artificially limiting the number of requests per second, or just passing the request to a completely different app depending on use case. And that's a good thing? Part of my point is that thi…

Yes, absolutely it all could work better with CS knowledge. But CS is also definitely not a prerequisite to having functioning apps that can scale well. CS can help you design the software equivalent of a Formula 1 race car. But most of us only need to work on things ranging from a Honda Civic to a semi truck. It's interesting how little of an education you need to work on a semi truck, even though it's a complex mac…

I think we managed to get on the same page then, I can agree to all of that.

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

#137
I've been writing a book series that's partially targeted for programmers like you: those who know how to code but don't know CS. It's called "Classic Computer Science Problems." You may want to check it out:

https://classicproblems.com/

If you already know Python or Swift, it may be a decent next step for you after CS 50.

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

#138
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 have to point out something that I haven't seen anybody say here -- there is a huge amount of variety in the difficulty of these sorts of interviews.

I assume that all FAANG interviews for entry-level software devs are akin to the standard Google interview, for which you are expected to study your ass off. I have not interviewed for one of those companies, but of course I know how much people study for them, and it disgusts me. However, I have had plenty of interviews which did have an algorithm-type section (the majority of interviews I've had have had something like that), and I no longer hate on companies for doing _that_. Plenty of the problems are relatively easy, once you figure out how to talk about them -- and being able to talk through your work is a legitimately valuable skill.

But, companies that expect applicants to put in the kind of work Google expects in order to stand a chance truly are not companies I want to work for. To some extent, it's just shitty; this "game" is mostly a test of how much time you have to spend. That cost is a lot higher for people who are less well off, which irks me, but that's true of most things in life.

The thing is, you talk about being "willing to play" the game. I don't want to work in a company of people who played that game.

First -- Playing the game means sacrificing important things; you can't spend all your free time studying which data structures to use for esoteric string manipulation problems, etc. AND spend all your free time learning the fine point weaknesses of different databases, good programming patterns, etc. By the time I started interviewing for my second job, I'd nearly burned myself out making certain I was learning how to do things right, learning how to be a good programmer. My free time was spent polishing the things I was working on and endlessly reading about how to do it even better. And then I was able to go into interviews for the jobs I was interested in and do what you're suppose to be able to do in most other interviews (programming or otherwise); actually talk about the company, their pain points, possible solutions they hadn't thought of but I had experience with, etc. At that time, I could not identify anything but the simplest algorithmic complexities... but to learn more than that would have been to choose studying useless information over useful information.

Second -- What makes a person willing to play the game, when there are plenty of other companies with interesting problems to solve and good salaries (maybe not AS good)? I can't help but feel there is a cult-like love of these big companies (or maybe it's the desire to prove oneself, since only RealProgrammers work for Amazon). And I don't want to work with a bunch of people who are extra excited about something I just don't value.

Maybe I haven't been reading the right stuff, but I just don't see the appeal. I don't particularly care for any of them as companies. Sure, if Amazon decided to pursue a pilot project aimed at providing its customers with low-carbon-footprint foods, I might want on board that project -- but not just to Amazon as a whole. Yes, these companies are large and well-known, but I don't particularly care if it's one million or one billion people who download an app I worked on. I know that getting a job in one of those companies doesn't mean you're going to do something interesting or big. I've had classmates get jobs at Google and I've worked with Google employees on certain projects, giving feedback etc. There's nothing I've seen about their jobs or projects that were particularly amazing or wonderful, except for the part where you then get to say you work(ed) for Google.

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

#139
Now you learned the practice, consider taking CS degree at uopeople.edu to clear "Must have Bachelor degree in CS" and just to learn stuff beyond the day to day stuff. Of course, it really bothers you, it is totally fine just keep going and solve real-world problems (not all of them require CS knowledge)

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

#140
I work as a data scientist, but sometimes when I have the time to study stats I get stuck on problems. I also write software on our team, and have never taken a CS course or studied algorithms formally.

It used to really bother me, and I still am motivated and invest time and energy into building fundamentals, but I also realize that for some reason, despite this, I'm effective at my job and people respect my work. Meanwhile, people who took all the most advanced PhD and CS courses often are unable to get things done.

As I've grown a little older I try to spend less time worrying about these things, and realize more so every day how large the disconnect is between solving abstract puzzles, and working on a team to get things done.

Although I think the people that have both in spades are something else, and I have a deep admiration for them.

Post reply on HN