r/AskComputerScience • u/jforrest1980 • Jun 17 '20
Steps for becoming a great programmer?
Little background. I'm a computer science major, on my second computer science course. We are learning about topics such as generics, efficiency of algorithms using Big-O, Lambdas, J-Unit, etc...
I am struggling hard, and plan on taking a semester or two off, to devote all my time to learning programming from the absolute basics. I am the type of learner that composing some code isn't enough. I REALLY need to understand how things work, or else I get hung up on super simple details.
So my question is, where do I start? I'm looking for more of a general plan to follow.
Such as...
go through this book on assembly, and this one on command line together.
go through this book on C
then read this book on java, then this one.
I would prefer book recommendations. My goal here is to get the foundation I need to become a really good programmer. I'm not looking to just pass a class. I want to have a deep understanding of the machine. We mainly use Java, along with J-Unit right now in my school if that helps. We will be transitioning to C# at some point, and will be using springboard as well.
My ultimate goal is to get into cyber security, such as penetration testing, and doing indie game development in my free time, if that helps.
Thanks in advance.
12
u/NebulaicCereal Jun 17 '20
Personally, my advice would be - don't get ahead of yourself. Computer Science tends to be a subject which is learned from the top down. You will learn these theories and concepts, as well as put together some code for projects, and slowly build your understanding. After that point, you start to go deeper into the machinations of computing, the world of hardware, and all the intermediaries. In parallel, you will take your computation theory classes which will establish a mathematical/logical background to everything you're doing along the way.
Learning is a long process. Remember that a Bachelor's takes 4+ years to complete! And the struggling, that is normal. Don't worry, the struggle eases over time. The material will of course get more complex, but your capability to attack & understand the material grows faster than its complexity. Just do the best you can (personally I don't recommend taking a semester or 2 off - that will make things exponentially more difficult when you return, but everyone is different) , engage in some passion projects, make some friends with common interests (optional but helpful), and before you know it you'll be a very capable programmer.
10
u/PianoConcertoNo2 Jun 18 '20
Don’t take a semester off.
The way CS is taught here is that some concepts (like algorithms) were introduced early, then later, upper level courses expanded on them. I was lost too during the early classes, but exposure and having gone through the other courses, helped immensely.
And even then, after the courses, it still pays to go back and review / read the text books.
So don’t take time off or try to force learning.
6
u/DrunkHacker Jun 17 '20 edited Jun 17 '20
Edit: I should have started by giving OP some props for wanting to truly understand the content rather than just regurgitate code to pass a test. You were my favorite type of student.
It sounds like you are learning the concepts in class (e.g. OOP, running time, lambdas, the importance of unit testing).
At the same time, books on specific languages aren't generally so abstract and focused on teaching on a conceptual level. Learning C in college isn't about memorizing the syntax but about understanding memory management, how the stack works, and most of all pointers. Java isn't about memorizing obscure APIs but getting familiar with OOP, introducing concepts like static vs' instance methods, pass-by-reference vs' pass-by-value, etc... These concepts are important across multiple languages, even Whitespace.
If you really wanted to take a year off to focus on understanding, I'd worry less about the language and pick up a copy of CLRS. But I suspect it will be difficult to get through without some guidance. Perhaps consider going to office hours and talking to your professor or TA about concepts you don't feel you fully understand.
6
u/emasculine Jun 17 '20
practice. take on projects, especially ones that interest you. the 10000 hour rule is an actual thing, imo.
edit: you know when you're getting there when you can actually see data structures in your head. at least that's true for me. seeing linked lists, race conditions, protocol flows, etc.
and Fred Brookes' Mythical Man Month and No Silver Bullet are absolute required reading.
1
u/jforrest1980 Jun 18 '20 edited Jun 18 '20
Thanks for all the replies everyone. I have read them all very carefully.
The reason I wanted to take a semester off to study is because I actually failed my 2nd CS class. I am working full time, and was trying to take a CS class, and another design class. I was getting home from work at 8pm, and working strictly on this single CS class 7 hours a night, and well over 12 on the weekends. I was failing miserably, with a grade under 60%.
That's the first time I ever failed a class in my life, and it definitely scared me a little bit. We went from the from topics in the first class like "this is a variable", and very basic J-Unit tests, to generics, and an onslaught of labs due every 2 weeks consisting of 14 classes. The leap was huge, and I couldn't keep up.
I have struggled to figure out why I am performing poorly. I think I don't understand how to effectively study. I will go through the text examples, fully understanding them and coding them out. When I have homework, it's like math where you always get a curve ball, and I can't figure it out. One example was I completely went through the template design pattern, and felt confident I understood it. Couldn't complete the homework assignment. Same thing happened with generics, and Big-O.
I just don't want to be in a position where I am struggling hard core again on top of working full time. I am in my 30's. I am 9 classes from this bachelors. My math is complete. I have this CS class, and one more that is suppose to be harder. I have heard after that class it's all down hill. Unfortunately the tutoring at my university is almost non-existent. From what I hear my program at Franklin University is a really good one. I've talked to other CS graduates from OSU that tell me they are teaching me a lot of things like J-Unit and Springboard that they never covered at OSU. The lack of tutoring is really brutal though. Transferring back to OSU, or anywhere with sufficient tutoring is not an option at this point, because nothing transfers and I would basically be starting over.
At this point, me graduating CS is not something I am doing for the money. I have to prove to myself that I can do this. For me. I thought going back and learning the core fundamentals would really help me. I thought CS is similar to someone trying to build a house that doesn't know how to lay a foundation correctly. I thought getting that foundation might give me some sort of edge to get ahead and not struggle.
1
u/claytonkb Jun 19 '20 edited Jun 19 '20
Sorry for the late reply, apparently the RemindMe-bot is not working...
The reason I wanted to take a semester off to study is because I actually failed my 2nd CS class. I am working full time, and was trying to take a CS class, and another design class. I was getting home from work at 8pm, and working strictly on this single CS class 7 hours a night, and well over 12 on the weekends. I was failing miserably, with a grade under 60%.
Mental productivity rapidly diminishes with time per day. The last 4 hours of an 8 hour day are significantly less productive than the first 4 hours and if you stretch into 12 hours with another 4 hour block, it will be less productive by an even greater factor.
Let's say you are 100 units productive (arbitrary units) in the first 4 hours. In the next 4 hours, you might be somewhere between 50-60 units productive. If you go another 4 hours, you might be 20 units productive or less. In addition, the long hours are likely to interfere with your sleep needs and you could end up being less than 100 units productive in your first 4 hours the next day. As the cycle repeats, you are grinding your total productivity down to a tiny fraction of what it could be if you worked fewer total hours in a day.
It is possible to stretch yourself and achieve higher than ordinary levels of productivity. But it requires careful planning and execution, which I will discuss below.
That's the first time I ever failed a class in my life, and it definitely scared me a little bit. We went from the from topics in the first class like "this is a variable", and very basic J-Unit tests, to generics, and an onslaught of labs due every 2 weeks consisting of 14 classes. The leap was huge, and I couldn't keep up.
One of the things I regret from my uni days is a failure to properly manage my class load with W's and I's as needed. For every class you take on, know the drop and withdrawal dates and check whether an incomplete is an option for that course. For courses, where I is not an option, make sure that you make a hard Go/No-Go decision before the W date. By the time you reach the W date, you should be able to make an informed decision on the course. Look at the syllabus and try to make a judgment as to whether the professor has "back-loaded" the course, meaning, you will dawdle around for the first 50-75% of the course, and then get slammed with work at the end. It's frighteningly common but when you look for the clues, you can often find them. The syllabus will have a whole bunch of advanced topics that are not being covered in early lectures. This often means that the professor is putting those off (probably due to other courses they are teaching) and will slam the class with them at the end.
If I had managed my drop/withdrawal dates and I's properly, I could have easily graduated 3.9-4.0 range. But my GPA is sadly closer to 3 than 4.
Most schools offer an "Academics 101" type of course (exact name varies) that covers these and other topics, such as unique study resources that are available at the school.
One of the things I did figure out in my upper division years was that advanced courses tend to assume that you are participating in study groups. The homework load is not reasonable for a single individual working alone. The idea is that the coursework should be encouraging group cooperation among students. In lower-division courses, you may have felt that this was somehow "cheating" but it's not.
Another important resource is tutors. I tutored math during most of my time in college (I minored in it) and this was beneficial for both me and the students I was tutoring. Check to see what tutoring options are available and take maximum advantage of that. Sometimes, even TA's and professors will provide a certain amount of tutoring assistance but you don't know who until you check into that.
Your school should have an academic counselor (or multiple) to help you with general academics problems like those you have expressed here. Sometimes, just getting that other point-of-view can be helpful in making up your own mind about what to do.
I have struggled to figure out why I am performing poorly. I think I don't understand how to effectively study. I will go through the text examples, fully understanding them and coding them out. When I have homework, it's like math where you always get a curve ball, and I can't figure it out. One example was I completely went through the template design pattern, and felt confident I understood it. Couldn't complete the homework assignment. Same thing happened with generics, and Big-O.
Yep, many professors love to throw the old homework-curveball. The idea (I guess) is that the curveball will force you to "really study". So, this is how I handled these.
First, I would sweep through the homework and quickly sort the assignments from probably-easiest to probably-hardest (curveballs, etc.) Then I would start solving them. Once I got to the pain-in-the-butt problems, I would check with my classmates to see how they were handling them. If the consensus was that these were doable, I would try to pick their brains until I got the "obscure trick" that I was missing. Usually, it would be a matter of finding paragraph X on page Y and really picking apart the definitions in it, or something like that. But if the consensus was that these problems are anyone's guess and the professor must be smoking crack, I would try to get one or two other students to go with me to the professor's office during their office hours. If you go alone to complain about the homework assignment, the professor will often just wave you off as lazy or incompetent. But if you bring a bunch of other students and you all point out that this homework assignment is a divine mystery and appears to have no connection whatsoever to the textbook or the lectures, then the professor will usually listen.
If the professor absolutely won't listen, then rank the points in this homework problem versus the points in other homework assignments that you have due. If missing this homework problem is only going to cost you 10% on the assignment and you can put time into some other assignment for 25% (for example), then consider skipping this problem entirely or, at least, writing down as much of the solution as you could work out (for partial credit) and then move on. "Show your work", basically.
I just don't want to be in a position where I am struggling hard core again on top of working full time. I am in my 30's. I am 9 classes from this bachelors. My math is complete. I have this CS class, and one more that is suppose to be harder. I have heard after that class it's all down hill. Unfortunately the tutoring at my university is almost non-existent. From what I hear my program at Franklin University is a really good one. I've talked to other CS graduates from OSU that tell me they are teaching me a lot of things like J-Unit and Springboard that they never covered at OSU. The lack of tutoring is really brutal though. Transferring back to OSU, or anywhere with sufficient tutoring is not an option at this point, because nothing transfers and I would basically be starting over.
Because you are working and going to school, this is going to require you to be a little more organized than most students. Make sure you are not giving in to the temptation to maintain the "typical university student lifestyle" while working this heavy load. You will have to have a regimented mindset. That means you need to get proper sleep, nutrition and maintain basic fitness. You can't afford to blow a Saturday on Netflix or stay up to the wee hours of the night playing your favorite game like students whose parents are carrying them.
In the last five years, I discovered Getting Things Done by David Allen. While a lot of it seems like "common sense", the logical organization of everything into one coherent system was really revolutionary for me and it has helped many other people. I highly recommend it. You don't need to get fancy, just a basic TODO list and reminders is enough to get started with GTD. The key to GTD is your mental attitude, not the accoutrements.
At this point, me graduating CS is not something I am doing for the money. I have to prove to myself that I can do this. For me. I thought going back and learning the core fundamentals would really help me. I thought CS is similar to someone trying to build a house that doesn't know how to lay a foundation correctly. I thought getting that foundation might give me some sort of edge to get ahead and not struggle.
Well, if you're 9 credits away from a bachelor's, you should really have the basics down. I'm not saying you will necessarily know everything but you should have a pretty good bird's eye view of the field by now. From the standpoint of academics, that's what a Bachelor's is all about... it's the basic academic foundation on which a more advanced degree can be built. DM me with specific questions or areas you feel you are lacking and I'll see what resources I can get you.
2
u/jforrest1980 Jul 01 '20
Sorry for the delay. I read over this very carefully. I've never had trouble with school, not even math. I've always been very strong in math, and science type classes. So struggling in CS has been difficult for me. I will check that book out.
Unfortunately, even though my university is regionally accredited, is all online. I basically only go to campus to try and get tutoring, back when I use to think I would actually get assistance. Now I rarely go because it's pointless. We've had many people from the university speak up about the homework, and tutoring quality. It is well known by faculty that there are issues, but the director of the CS program is the one who makes the curriculum, therefor, he makes all the decisions when issues arise.
My class last semester went from 32 students, to only 6 near the end of the semester.
So I am learning things on my own now. Trying to take on projects that interest me, and will help keep me motivated to understand. A lot of people here mentioned to just get programming, and that is my ultimate goal now.
Thanks for the long post and guidance!
1
u/claytonkb Jul 02 '20
I understand. It's a very difficult situation when the curriculum is lacking.
4
u/aydencook03 Jun 18 '20
I know you wanted books, but if you really wanted to learn from first principles, I would recommend Crash Course's Computer Science series on YouTube, and Ben Eater's two series, 8 Bit Breadboard CPU, and 6502 computer from scratch.
1
u/jhaluska Jun 18 '20
I wouldn't recommend taking a semester off.
I have heard good things about Nand to Tetris. That should give you an extremely deep understanding of a single machine.
1
1
u/blitz4 Jun 18 '20
There's a great cartoon strip here
You're not alone. There's a discord channel of people doing the challenge. People were just like you at one point. Pick a project you want to do, anything. Don't give up. If you ever feel like giving up. Listen to the freecodecamp podcast.
1
3
u/willhtun Jun 18 '20
Ditch the books, start coding. The secret is time and mentorship. You can get the latter through internships and work. I bet all the great programmers learn from their mistakes and experiences, not from text books. Granted, the textbooks are required to get the fundamentals, but they won't do you much good beyond that.
2
2
Jun 18 '20
Why do you want to take time off from your program? Your program should help rather than hinder you so be careful!
For Books:
Software Engineering:
Code Complete The Pragmatic Programmer
Algorithms: The Design and Analysis of Computer Algorithms This book goes over sorting, graphs, and common algorithms. Before reading this it may help to do a crash course on algorithms including arrays, linkedlists, hashmaps, trees, tries, bit manipulation, queues, stacks, etc. Honestly even reading Cracking The Coding Interview and looking up the data structures when you don’t know them and doing some practice will be good.
OS Modern Operating Systems by Andrew Tanenbaum.
I’d recommend you learn C and C++.
C++ is used in the game industry. I don’t have any recommendations here other than the fact that C++17 is much different than earlier C++.
I don’t know too much about cyber security but it interested me before I decided to go the software/data engineering route. I know that some basic cert books that help prepare you for the CEH or OSCP are decent reading. I’ve heard the certs themselves are controversial but it could be a good starting point to learn about some of the higher level concepts and some of the tools used by professionals.
I’d recommend you actually reach out to some professionals in different careers and companies that interest you. Cyber security itself is also broad. I can’t recommend this enough. Ask them what they like about their job, what they dislike, how did they get there, for advice, and get a sense of what they value. See what it might be like to be in their shoes. You’ll be in a much better position and you’ll also be networking!
Hope this is of some help! Best of luck!
2
u/roman_fyseek Jun 18 '20
So, what you're saying is that you believe that following books and bootcamps will make you a better programmer than the tried and true method of following through with homework assigned by skilled professionals?
Sweet.
1
u/UnpaidCommenter Jun 18 '20
I'm not sure if you already know all of this, but these books may be interesting:
Code by Charles Petzold
The Secret Life of Programs by Jonathan Steinhart
The Elements of Computing Systems by Nisan and Schocken
1
u/PmMeYourSexyShoulder Jun 18 '20
Reading all the books in the world won't make you a great programmer. They will give you knowledge and techniques. But only the only thing that will keep you honest and avoid bad habits is peer reviews of your code.
1
u/wescotte Jun 18 '20
I'd check out handmade hero which is a guy streaming the entire process of making a game from scratch. Since he's not using any game engines and very few libraries you'll learn a whole lot of low level knowledge and be privy to lots of real world experience. The one big downside is there is probably over 600 hours of content to catch up on though. The channel has lots of playlists to group topics so you can still learn a lot if you aren't willing to start from the first video.
1
1
Jun 18 '20
I REALLY need to understand how things work, or else I get hung up on super simple details.
Unlearn this. It isn't helping you in anyway, and it is obstructing you from doing real work. This never changes. There are always deeper layers to explore in real world problems, it is super critical for any engineer or scientist to know where and how to stop the need to investigate further.
Secondly, programming languages are not Computer Science. If you want to be a programmer, definitely drop out of school and write a bunch of code. But if you want to be a Computer Scientist, learn that coding is just a domain specific language for talking with a Computer and you only need to know enough to do what you're trying to do. Understanding what you want to say is infinitely more important than how you say it.
1
u/claytonkb Jun 19 '20
In my other post, I gave a long reply regarding general academics considerations even though that is not your actual OP question. I think the advice I gave about Getting Things Done will be helpful to you no matter what, so please look into that.
As for your OP question, I recommend you watch the following video which has absolutely nothing to do with programming, yet has everything to do with it:
The drawing advice that changed my life
I recommend learning Python because it is pretty much the closest thing to "executable pseudocode" out there. And pseudocode is really how our brains think about step-by-step procedures. Python is easy to install on your machine or you can go to repl.it and create a free account there. Use Python as your language for "deep understanding" of a new concept (algorithm, data-structure, etc.) When you can code it from scratch in Python, you know you understand it.
Next, I would take a look at RosettaCode. If you want to develop "breadth", I would say pick a reasonably difficult task from the list of tasks (say, writing your own quicksort from scratch) and then re-implement that task in as many languages as you care to learn. Each new language will give you a slightly different perspective on what you're doing... kind of like drawing the same thing over and over. If you want to develop "depth", then I would say to pick a language (it could just be Python, or something else) and then implement as many tasks in that language as you possibly can. Use the worked examples as a way to dig yourself out of a rut, but try to work independently as much as possible.
Possibly one of the most overlooked data-structures is the hash-table and I recommend learning everything you possibly can about hashing and hash tables. You don't need to be able to build and write your own (although it's a perfectly healthy exercise to build your own) because there are plenty of libraries out there that just do this for you. But learning to think in terms of hashes can massively boost your applied problem-solving ability. O(1) beats O(log N).
0
Jun 18 '20
[deleted]
4
Jun 18 '20 edited Jun 18 '20
I disagree with the above comment. I really do.
You will never, ever become a security "expert" if you lack the fundamentals. Our world is built ontop of layers of abstraction and the holes are often where the layers meet. If he lacks proper understanding of how bugs occur, how exploits are made, or where xyz stems from, why we do abc and so on, he will never get to 'become a cyber security expert'.
To give you some examples, a thesis project that was in my scope last year was focused on programmatically modifying x86 assembly emitted from rust in order to break lifetimes. A colleague was working on a paper that managed to break the memory safety of rust that used C sandwitched between rust layers. Another colleage was doing a survey paper on rowhammer attacks.
1
u/ironymouse Jun 18 '20
It's sometimes relevant, but in the span on most cyber security expert careers you would not expect to go as far as your colleague to the level of the electronic interactions between memory cells.
2
Jun 18 '20
Definitely, I don’t expect everyone to know how row hammer works let alone special cases in. I was trying to stress that to be a cyber sec “expert” you need to know the fundamentals and then you can specialize in some area.
3
u/TholomewP Jun 18 '20
You can't go from being a beginner to being a great programmer. You need to become a bad programmer first, then an ok programmer, then a good programmer, etc. So my advice is, start small, and attend to the problems you find there with all your effort. Don't get ahead of yourself. Don't consider any problems to be beneath you. In other words, practice humility and give yourself time.