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

81–90 of 309 posts

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

#81

Think of it this way: application development, software engineering, and computer science (and data science and ... etc) sometimes use the same tools but are all different disciplines. Universities traditionally focused on Computer Science and their graduates would often need a lot of grooming before they could really be independently and reliably productive in the commercial words of application development or softw…

What's the difference between application development and software engineering?

In practice, the main difference is the pay / relative "rank" within a company. Employer's perspective: Want to hire a software engineer but don't have the budget? Create a new role, call it something else, now the pay difference is justified.

Context - I'm a software engineer by title but my job is application development. Which is hard, mind you! It looks like simple coding but it involves prioritizing, making smart decisions, and making all stakeholders happy.

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

#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 theology: the mathematical study of hypothetical superintelligent beings such as gods. Its concerns include:

If a God or gods existed, how could they reveal themselves to mortals? (IP=PSPACE, or MIP=NEXP in the polytheistic case.)

Which gods are mightier than which other gods? (PNP vs. PP, SZK vs. QMA, BQPNP vs. NPBQP, etc. etc.)

Could a munificent God choose to bestow His omniscience on a mortal? (EXP vs. P/poly.)

Can oracles be trusted? (Can oracles be trusted?)

And of course:

Could mortals ever become godlike themselves? (P vs. NP, BQP vs. NP.)"

https://www.scottaaronson.com/blog/?p=56

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

#83
post #51
post #43

Earlier quoted context omitted.

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…

Your first paragraph hits the nail on the head. This is exactly me. Thank you for your reply. I do intend to work further on my skills in order to get better!

One (relatively) easy way to get better at it is combining a book and some real world uses with a project and a language suited for it.

For example, you could take python or java (or C#, pretty much any general OOP language), and make a simple crud application. Then add a "reporting" page where you can see different results on for example uses of trees, sorting algorithms or storage data structures (like linked lists, hash maps etc). The crud part can be your familiar part where you have a good feel of what's what, and the report/test/whatever page can be your sandbox to see how your experiments deal with your data.

One of the books I found helpful was Data Structures and Problem Solving Using Java by Mark A. Weiss.

A softer start can be found with http://interactivepython.org/runestone/static/pythonds/index...

If you want something using languages you already know, that's fine too. Say for example you wanted to simply know how to build a tree, or more generally a graph. Those concepts may sound big or complex, but they are only as big or as complex as you want them to be allowing you to build a simple version (i.e. a class that is a node in a linked list, and it holds just a number as a value and the next node for your list as a pointer or value or whatever you like). It's something you could do in 10 lines of code just to get yourself started. Building on top of that is a whole lot easier than jumping straight into AVL trees and A* path finding algorithms.

Starting light, say, making a few things yourself in a language of your choice will get you a good feel as to what you want to explore and how easy it is to grasp the concepts, for example:

- linked lists and doubly linked lists

- binary trees (binary doesn't mean binary data, don't worry)

- sorting (check quicksort, shellsort, bubblesort on wikipedia for starters to get an animation for an idea what it is)

- heap

- stack

- (priority-) queue

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

#84
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 mean, I notice that these assignments seem to assume that you are using C. Are you using C?

You said that you have used PHP, Javascript and VB.Net. C is much harder to use than any of these, and exposes you to many concepts that these languages have abstracted away.

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

#85

Earlier quoted context omitted.

>And that's okay! Inventing new algorithms with theoretical significance is not your job! You have other skills and they're of much more immediate value! Except when it comes to getting a job. Forget any of the rest of your skills, because we all know the only thing that matters when interviewing is an ability to recite CS algorithms out of memory and solve obtuse puzzles while pretending you've never seen them.

Except when it comes to getting a job. Forget any of the rest of your skills, because we all know the only thing that matters when interviewing is an ability to recite CS algorithms out of memory and solve obtuse puzzles while pretending you've never seen them. I’ve been a professional developer for 20 years and have never had to recite CS algorithms or solve obtuse problems. My last three jobs I had to whiteboard an…

I am guessing you don’t work in the Bay Area.

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

#86
post #44
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…

What exactly did you have trouble with? These really are simple problems, all you need are an understanding of loops, ASCII character codes, and basic arithmetic. To be honest, I'm surprised a seasoned developer of 5+ years can't do these, or at least have a decent stab at them.

Why would you expect the modern application developer to even know what ASCII is?

There is a chance I wouldn’t know what ASCII encoding was if my exposure to programming didn’t start in the 8 bit era. C is foreign to a lot of self taught programmers.

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

#87

Earlier quoted context omitted.

I have yet to see a definition of what “invert a binary tree” even means.

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.

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

#88
post #47
post #41

Earlier quoted context omitted.

Is there a particular part of these problems that is stumping you? Perhaps breaking them down into smaller sub-problems? Where is it something else? Based on your original description I was expecting something more heavy on straight CS theory. “how do you sort an unordered binary tree in place“ kind of thing.

I've never been so great with figuring out loops to iterate over things and the like. And some of the questions being posed (which are all expected to be solved in C) are a little tricky for me to figure out on my own without some of the niceties which I have been exposed to in higher level languages. Perhaps the hardest of these was the Credit Card Validation example. I was stuck for such a long time on trying to fi…

> Figuring out loops

Maybe you're making it too complicated. The reason for loops is simply that you need to repeat an operation. Call it repetition if that helps.

- for x;y;z - repeat a specific number of times, or need an index #

- for x in y - iterate over container

- while x - repeat while a condition is true

- do while x - like while, but run at least once.

So, imagine we have a string and need to add 1 to each character. The second bullet above looks best, first if the language is lower level.

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

#89
post #55

Earlier quoted context omitted.

>And that's okay! Inventing new algorithms with theoretical significance is not your job! You have other skills and they're of much more immediate value! Except when it comes to getting a job. Forget any of the rest of your skills, because we all know the only thing that matters when interviewing is an ability to recite CS algorithms out of memory and solve obtuse puzzles while pretending you've never seen them.

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 like you and I pretend to make the choice of, "I'd never work there" when the reality is, "They'd never hire me", and it does everyone a disservice to continue to perpetuate that lie. It's not a problem or a negative thing that FAANG would never hire me/you, it's just the truth.

FAANG would never consider hiring you or me as-is, but if we worked really hard for awhile, they would. This has nothing to do with our ability to do the job they'd hire us for, but that's the game, they want their candidates to be good at the game, and I'm at least willing to play. You aren't willing to play, and that's fine, but don't pretend like you're being the discerning one here.

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

#90
post #58

Earlier quoted context omitted.

Can you solve these problems in your language of choice then? How can you write business logic at work without loops?

I tried looking up various solutions in languages which I knew a lot better, so, and example of one of these would be Go. The logic was there, but I still couldn't understand most of what was going on, unfortunately. Through trial and error, I eventually managed to get something working. >How can you write business logic at work without loops? It's not that I don't use them, it's that I have a hard time figuring out…

I would be very interested to hear about some examples of real-world contexts that have proven tricky. As much detail as possible is preferable.

Incidentally I describe my problems with math almost the exact same way - virtually nonexistent fundamental understanding, and so huge issues with abstracting out even the simplest real-world tasks. (My wake-up call was when I was basically just mashing buttons on my calculator one day when I realized I didn't know how to compute how much of X I could buy given that it was $Y per weight.)

Post reply on HN