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

111–120 of 309 posts

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

#111

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...

I'm confused. Doesn't the operation described in those answers just rename each node's properties, but leave the topology of the data structure unchanged?

Meaning one could just have the code accessing the tree swap which names it accesses, and the tree would behave as "inverted" with no actual need to invert anything?

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

#112
Most of professional software development is knowing what's out there and connecting them together. It's basically data plumbing. There's nothing wrong with that, running water and sewage are two of the pillars of civilization!

The problem is that lots of companies have high opinions of themselves and even if most of their work is plumbing and plumbing supplies, insist on having a hydrographer and a physicist on staff in case they really really need an R&D program that can produce a O(k) B-tree or some nonsense.

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

#113

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…

Since we're sharing anecdata, I'm a professional developer and still use recursion, building/traversing various types of tree data structures, and a few other CS degree requirements.

That said, for algorithms (e.g. sorts, etc), understanding what the options are and trade-offs is certainly more useful than knowing how to implement them, since there's a good chance someone has implemented it already in your language of choice.

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

#114

Earlier quoted context omitted.

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…

As a person without the degree that works at one of these companies, I can honestly say that it's incredibly difficult to get in. What I haven't seen anyone talk about is how it haunts you constantly. Not necessarily coming from other people, but knowing that if someone wanted to call you incompetent, it'd be on you to prove otherwise since you dont have the degree to back up your knowledge. I wish I could go back an…

[deleted]

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

#115

Earlier quoted context omitted.

Wasn’t trying to imply that’s the case. I’d love to move out of the Bay Area, just to get away from the whole “leetcode or GTFO” interview style, but the fact that there are so many opportunities around here keeps me here for the moment. Well, that and I can actually make enough money to pay my student loans while living somewhat comfortably and saving a little money. If I knew anyplace that had decent weather where…

Give SoCal a shot. You can get very competitive salaries when compared with NorCal right down here, and the cost of living is not quite as bad. I'm hiring Ruby devs down in Costa Mesa, and I don't ask any algorithm questions :)

You should email me. It's in my profile. I have... questions. :)

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

#116

We're gonna need some examples here. One person's fizz-buzz is another's constant-time radix tree with one register and vice versa.

Unfortunately, these are fizz-buzz tier. https://news.ycombinator.com/item?id=18446313

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

#118

Earlier quoted context omitted.

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.

ASCII does still map to the most commonly used parts of Unicode, so there is that. I would agree that I wouldn't have the foggiest idea what most of the ASCII character codes are if I hadn't cut my teeth on archaic stuff like QBasic; I remember a lot of silly little toy assignments doing rot13 or manually upper and lowercasing strings. But they do come up from time to time when you get into, for instance, JS keydown/…

Don’t ask me why I remember that the lazy non performant way to put a character on the screen in assembly was to store the ASCII number in the A register and

JSR $FDED

The fast way was to copy the bytes directly to the $400-$7FF address space and figure out the non contiguous memory map -> screen yourself.

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

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

There is very good advice and suggestions here, but IMO this thread is also distinctly "noisy" - lots of discussion and sharing, but very little in the way of a coherent go in this direction!.

So, I'd like to offer a couple of things that may be of immediately actionable, relevant assistance: SICP and NAND2Tetris.

--

SICP - the Structure and Interpretation of Computer Programs - was designed as an entry-level theory-first approach to programming. If you want to drown your brain in abstraction and get oriented quick, this will help you do that. It's very dense; expect to read it slowly, and also don't force yourself to block on one specific spot until you've understood it. If you can reach some sense of logic and order that lets you get through CS questions without breaking a sweat, who cares if you had to read the textbooks backwards or out of order.

I explicitly recommend SICP because you can find PDFs and EPUBs of it online (it's quite an old/classic book). I see a lot of book recommendations on here that I can't follow up on due to insufficient throwaway budget.

Plus, studying SICP with your fianceè will put her in a significantly better position to ace her CS courses.

I found this HTML rendering: http://sarabander.github.io/sicp/ (google will very readily find PDF and EPUB copies, but this version seems nice)

--

NAND2Tetris explains every step of a CPU from the electrons up (as opposed to the top-down orientation taken by eg JS, VB, etc), and has you build a toy CPU.

https://www.nand2tetris.org/

Unfortunately I've just discovered that this course, which used to be a little more open, seems to have closed down somewhat. Either that or I misunderstood and it was never an open course.

This being said, searching for "The Elements of Computing Systems" - the reference textbook for this series - is finding a PDF pretty quickly. The book itself is apparently listed on Amazon, so perhaps the PDF version could provide an idea of whether it would provide any value.

This course is taught in many CS classes IIUC, so studying this with your fianceè will also leave you both in a better position.

--

Also - I've been wanting to see how well I can explain pointers and so forth for a while now. Ping me if you like.

(I seem to be atrocious at email/IM-style communication, FWIW, so this may go horribly wrong)

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

#120

Earlier quoted context omitted.

ASCII does still map to the most commonly used parts of Unicode, so there is that. I would agree that I wouldn't have the foggiest idea what most of the ASCII character codes are if I hadn't cut my teeth on archaic stuff like QBasic; I remember a lot of silly little toy assignments doing rot13 or manually upper and lowercasing strings. But they do come up from time to time when you get into, for instance, JS keydown/…

Don’t ask me why I remember that the lazy non performant way to put a character on the screen in assembly was to store the ASCII number in the A register and JSR $FDED The fast way was to copy the bytes directly to the $400-$7FF address space and figure out the non contiguous memory map -> screen yourself.

(After a "...I never used that in QBasic!", google explained that this is for the 6502)
Post reply on HN