Learning Intro to CS in hacker vs purist style Computer Science |
Learning Intro to CS in hacker vs purist style Posted: 29 Nov 2021 09:58 AM PST I know programming is not computer science. But programming is an useful tool in CS. Hence almost all Intro to CS courses teach programming in some form or the other. Now the concern. There are two schools of teching intro to CS. One is the hacker's way using a language like Python, Javascript, etc. Students are expected to fumble around and learn things on their way. Like an apprentice. You gradually learn best practices in later courses. Second is the somewhat purist way. Using books like HtDP, SICP, etc. You are taught all the correct ways and best practices right away, so that your mind doesn't get polluted with "garbage" ways of coding. My question is even if you are taught the second way (LISP) you are bound to encounter garbage when you work in the real world. How do you identify and tackle those? Or maybe you are forced to code in a garbage language for some project. Are you prepared? I believe there are people in this sub from both the categories or maybe you have worked with both the categories. Is there any advantage of one over the other? Or does one produce better engineers than the other? [link] [comments] |
What are the most important mathematical proofs/theorems to know in CS? Posted: 29 Nov 2021 11:16 AM PST I have an interview tomorrow and I've been using leetcode to study for the past few days. I haven't been doing as many practice problems as I should have as I never really made it a priority, so I'm attempting to speed run my progress. I have improved a lot over the last few days, but I realize that I don't have the time to do enough leetcode questions to cover all the information I need. As such, it is possible that I will need to come up with an algorithm on the spot. From my experience with mathematics, I know that often times, seeing the solutions to certain questions requires prior knowledge(the "Lemmas" of a proof). I ran into a problem recently where I had a connected component of nodes labeled 0-3 and values a-d(the problem is called "smallest string with swaps"). My objective was to sort the values to form the smallest lexicographical(alphabetical) string if the nodes were treated like indices of a string array. My approach was to greedily put the smallest values into the smallest indices possible, but I was unsure whether or not it was possible to have a given value move into a given vertex while guaranteeing that previous values can stay in their original place. For example: I greedily push value a to the index 0 position. I now know it would be optimal to put B in index 1, but is it always possible to put B in that index without shifting A? Does it matter if I shift A(can I shift it back no problem)? I don't know, and I ran out of time before I could find out. TLDR: What are some must-know proofs/theorems that you find yourself referencing all the time when trying to figure out the answer to a new coding problem? [link] [comments] |
You are subscribed to email updates from Computer Science: Theory and Application. To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google, 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States |
No comments:
Post a Comment