Ask HN: I've been a programmer for 6 years, and I can't solve basic CS problems
404 pointsMy fianceè is currently enrolled on CS50 Introduction to Computer Science online.
I'm a programmer and have been for around 5-6 years, I started with VB.NET since I first started learning, then progressed onto Web Development at a large agency for 4 years (PHP, JS, React) and I'm now back with VB.NET.
I've worked with a few "complicated" (they were to me) projects in the past, but now I'm being tasked with guiding my fianceè with this course.
Some of the problems which she is expected to solve are pretty simple problems, but I just can't seem to get the hang of any of them on my own.
I would have thought that my last 5-6 years of experience would at least help me here. I can point out basic syntax errors and help with debugging, but when it comes to me trying to solve these problems on my own, I don't know where to start.
It makes me question how I was hired in the first place.
Sorry for the rant, but I was just wondering if anyone else felt like this.
Comments (296) 90 threads
Show all comments
Showing thread 27 of 90
The CS backing can definitely help, though. We've had plenty of problems at my job that involve writing a parser for often very tiny languages. Having an understanding of CS theory here — the various language classes, what an FSM is and where it is useful, etc. — definitely helps. However, often the language at hand is simple enough that a handrolled parser that skillfully uses a few regular expressions to get the job done suffices just as well. Googling for a parser library and just using that suffices, too.
Or we have to build a somewhat custom file format, or parse a somewhat custom file format. I've interviewed a fair number of candidates that are not comfortable reading or writing bytes to a file. (And of course, this is not the only question we judge them on. But very few candidates in my experience only miss a single question.) They've worked on innumerable "RESTful" APIs, but seem to have no idea how HTTP works; they've done server side Linux/unix/etc. development all their life, but never worked on a command line.
I hold a CS degree, and what grinds my gears is when it is just dismissed outright. As an example, I've had a coworker who was trying to determine what order various interdependent tasks needed to be accomplished in; to anyone who has been through graph theory, this is simply a topological sort, and there's a rather trivial algorithm that you arrive at in the course of studying graph theory. But at the suggestion of "this problem is a topologicial sort; X is a decent library that implements it", I get told "Now, I don't want to go down some PhD CS thesis rabbit hole." Right.
> fianceè
"fiancé" for a man[1], fiancée for a woman[2]. (Pronounced the same.)
[1]: https://en.wiktionary.org/wiki/fiancé#English
[2]: https://en.wiktionary.org/wiki/fiancée#English
1. Lat/lng positions (find all rows where lat between [lat1, lat2] and lng between [lng1, lng2]
2. start time/end time pairs (find all rows where the event is in or overlaps this range)
Then those two dimensions/attributes are put into what is often a B+ Tree or similar index. B+ Tree indexes can really only efficiently query on one range, and only if every preceding attribute in the tuple that the index is built from is specified exactly. The first example w/ lat lngs is particularly bad.
But a lot of developers working w/ databases have no idea what a B+ Tree, or even any tree really means. They get that it's a tree, and that it's ordered. But there's a gap between that and somehow being able to think it through and arrive at the fact that the database must either:
1. walk a lot of rows that aren't going to match (they typically do this)
2. or do a hell of a lot of range scans (they typically do not do this, and it's not really always possible)
Often I find that they think it is /= with each attribute individually, when it is really more like the tuple being indexed as a whole has a < operator implemented for it (by the database). Thankfully the analogy of find all people whose first names start with "Th" in a index ordered first by last name usually clears it up somewhat fast, but it took me a while to find that analogy.
(My CS degree included a course on relational databases. We covered everything from theory, such as relational algebra — operations on sets of tuples — to concrete implementations such as PostgreSQL and how to efficiently store indexes/data on disk. The professor I had was absolutely amazing, though I did not really realize this at the time.)