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 3 of 90
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 little hastily as I was feeling quite strong about having inadequate knowledge to solve these problems.
You've all been super nice to me, and I can understand where you are all coming from.
Again, thank you.
As an aside, the problem that I was stuck on earlier, I managed to solve through a bunch of trial and error, so I'm chalking that one up as a win for tonight.
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.
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 figure out how to utilise an array with for loops to multiply every second number of the card backwards.
This is Introduction to Computer Science and all of this is from week 1, so I was pretty much falling at the first hurdle.
Continue this thread — 4 replies
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.
You probably lack in "coding"(maping solution to code) department - it's totally normal in language you don't work in day to day. You are probably less skilled in implementing simple, lower level abstractions - understandable given your background.
I have more exp than you - recently I was helping friend with python ML code - it took me 40 mins to code 20 lines. I don't feel bad at all, because even though I knew solution, to write it in python I had to google for each line and read docs to know range handling, dsl of libs, array comprehension syntax, lambdas etc.
Good news is that it's easy to get proficient fast by doing such exercises. I can recommend codewars.com
I was having a related conversation earlier, and feel like I'm reprising the same argument for a new audience, but... I don't see what is either Computer Science or theoretical about that. It seems like an eminently practical task: Handling things in a tree structure, sorting items, and doing work in-place to conserve resources are all very concrete, real-world aspects of writing software. You might not need them in _every_ case, but they aren't really "theory" in any real sense.
I turned down a job offer where the interviewer was more concerned about whether I could write a merge sort on the board (I did), than whether I could design a system. It told me a lot about the kind of people they hire.
I spent my first 12 years as a developer doing a lot of bit twiddling in C writing cross platform code with nothing but the standard library, but these days if someone asked me how to sort I would call a library function. Heck even C has a built in sort function.
Continue this thread — 1 reply
This requires a completely different skillset. You rarely have to come up with novel algorithms when building a CRUD app, hence why you've never gotten the chance to practice those skills. That said, it's definitely worth learning - if nothing else because it will help you in job interviews.
There's no shortcut to this. Go on leetcode or hackerrank or similar sites - or do all the homework assignments and projects along with your fiance. You're working out a brand new muscle, so it will definitely seem frustrating at first, but you'll get much better with practice.
Thank you for your reply. I do intend to work further on my skills in order to get better!
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
Continue this thread — 1 reply
[1] https://www.htdp.org/
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.
I do tend to make things harder for myself, as my boss and fianceè have told me before.
I usually end up with a very convoluted solution which I end up coming back to and refactoring the next day.
Continue this thread — 1 reply
http://wiki.c2.com/?MakeItWorkMakeItRightMakeItFast
Continue this thread — 6 replies
If I get something wrong, my boss lets me know, I learn from my mistakes and ship out good quality software.
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.
You should be able to use a search engine to figure out what ASCII is, though. That's fair game to expect. The text document mentions ASCII, so it's not like a developer would be left without a clue.
Continue this thread — 2 replies
I base my Opinion on it being a bad idea to rely on manual translation, and untill then I'll have learned to write code that does the translation for me.
Continue this thread — 2 more replies
Continue this thread — 3 more replies
Continue this thread — 14 more replies