I've been writing code for 15 years, but only what I'd call 'programming' for the last 3! My biggest takeaways have been:
- never copy and paste code into your codebase, always type or re-type it
- only copy/paste code you have written at least once before
- never be afraid to write throwaway code to test or prototype a problem
- never be afraid to throw out code
- try writing the same thing over three times from scratch, only keep the best one