I was asked at work to write some tips for computer science students, specifically with respect to working on assignments. Here they are:
- Start working on programming assignments early. It is often difficult to estimate the time it may take to debug potential errors.
- Practice running code taught in lectures and labs on your own. Tweak the sample code and try to understand how the behavior changes.
- If a task seems complicated and you are unsure how to tackle it, consider using version control (e.g. git) while you try out possible solutions so that you can easily try different approaches without losing your previous attempts. This will get you practice with a useful tool, keep your editor clean and let you try out new approaches without losing previous work.
- If you get stuck on a problem, take a break - go for a walk, eat a snack, take a nap - and come back to it later and give it a fresh start.
- Practice and improve your programming skills by working on side projects outside of coursework. Create a webapp or project or anything that interests you. Practice using best practices in writing your code, write useful comments and docs, use version control and write tests. Include an open source license and make these repositories public on GitHub so that you have a portfolio of projects to show future employers.