Best Resources for Learning Essential Computer Science Topics

0
11
Asked By TechieTurtle92 On

Hey everyone! I'm currently a mechanical engineering and robotics student, and I've been diving deeper into programming for my robotics classes. I've got some background in programming, including three years with MATLAB, about six months with Linux and Python, and a bit of experience with C, C++, Lua, and Rust. I typically use Neovim as my IDE.

While I'm comfortable with core programming concepts, there are some areas where I'm lost:
1. Code testing and unit tests—I generally just write the code and run it.
2. Debugging—I'm mostly using print statements, which makes it tough when dealing with larger projects.
3. Error handling—I'm unsure whether this is mainly about writing manual exceptions or if there are built-in language features to manage errors.
4. Code safety and cybersecurity—I understand there can be issues like memory leaks, but that's about it.
5. Reading source code—I find it overwhelming to interpret someone else's code and am not sure of the best practices for doing so.

I'm looking for recommendations for books or resources that could help me tackle these topics. Thanks a bunch!

6 Answers

Answered By SecureCoder11 On

For cybersecurity and code safety, start with learning the OWASP Top 10, focusing on buffer overflows and input validation. Also, if you're coding in C/C++, tools like Valgrind can help with memory issues.

Answered By DebuggingDynamo98 On

For your gaps, consider these:
- **Testing**: *The Pragmatic Programmer* has great insights, and look into pytest or JUnit for practical testing techniques.
- **Debugging**: Forget print statements—learning tools like gdb or using IDE debuggers will save you time.
- **Error handling**: Language specifics matter, but there are also general patterns you should learn, like failing fast.

Answered By EngineeringGuru44 On

At your stage, shift your focus from learning more languages to mastering core engineering practices:
- **Testing**: *Test-Driven Development by Example* is a fantastic read.
- **Debugging**: Get comfy with gdb or lldb instead of relying on print statements.
- **Error Handling**: *Clean Code* by Martin covers great practical patterns.
- **Security**: *The Web Application Hacker’s Handbook* builds a strong security mindset, even if you’re not in web development.
- **Reading Code**: Pick a well-written repo and examine it slowly for understanding.
Overall, building a solid, non-trivial project will often teach you more than simply learning theory.

Answered By DebugDynamo76 On

I'll break it down for you:
1. **Code testing**: As a former AWS backend engineer, I always used unit tests in Java with frameworks like JUnit. No matter what language you use, check out the documentation for the unit testing tool specific to that language.
2. **Debugging**: Instead of sticking to print statements, try using your IDE's debugger. Setting breakpoints makes it much easier to navigate through large codebases.
3. **Error handling**: You should use exceptions for serious errors. For more mundane issues, return error codes or objects. Starting with fatal assertions is a good way to get accustomed to error catching.
4. **Code safety**: Memory issues and proper handling can really make or break your applications—especially in C/C++. Be careful with things like out-of-bounds access!
5. **Reading source code**: It often helps to skim code initially to get a sense of functionality and then go line-by-line when you need to understand specific changes. Talking to the original author, when possible, is also huge!

Answered By CodingWhiz03 On

You’re in a great position already! Here are a couple of books I recommend:
- *The Pragmatic Programmer*
- *Clean Code*
Also, make sure you learn how to use a real debugger and start with smaller code repositories when reading other people's work. The practical experience will definitely help you develop further.

Answered By CodeNinja22 On

For code reading, you might want to try out r/runable! You can paste code snippets or repositories there, and it’ll help explain their structure and flow. The insights it offers could be super handy when you're feeling overwhelmed.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.