Are we allowed to use our own code again?

Hi, this could be a stupid question but are we allowed to use small snippets/sections of our own code from different projects as long as it is our own code or do we have to start from scratch 100% every time?

I am still on the front end developer course. I am doing the portfolio section. I mean I guess it’s OK to use bits from the other websites we have built, even if it’s just a picture in the ‘These Are Some of My Projects’ section (unless we put our project pages inside frames or something).

I was thinking more generally though throughout the course. I mean I am starting to develop a sort of ‘framework’ and a few tricks that I can re-use in different projects but is the idea of each project like we should treat in like a mini-exam and start from scratch each time so the stuff we have learned sticks in our brains more?

1 Like

As long as you’re not passing off someone else’s work as your own.

1 Like

If you want to copy-paste what you’ve done before for a specific scenario then yea go ahead. However consider how many times you may have to do this in the future, or create something similar to what you created before but not exactly. In these situations you want to know how what your copy-pasting works.

In that regard it might be better to be able to “re-do” what you’ve done before from memory. Worse case scenario, you can lookup how you did it before. The goal of this process is to get more into muscle memory, rather than rely on work you’ve done before.

Another reason to re-consider just re-using previous work is the fact odds are what you wrote before could probably be better. As such re-using old code that might do things well enough to work, but might be “rough around the edges” might not be the best idea.

As a professor I once had said during a “review” class. “Its better to be bored than confused”. Re-doing what you’ve learned before is fine, consider it a refresher and re-enforcement.

Good luck!

2 Likes

Thank you both for your input. I think it is best to try and do it again - if I can remember how haha.

Reduce, reuse, recycle :recycle: