ghazalghorabi / TDA553-lab1

0 stars 0 forks source link

Bad practice: Commented-out code #19

Open martinjonsson01 opened 1 year ago

martinjonsson01 commented 1 year ago

It's bad practice to leave commented-out code in commits. When debugging locally and testing things out, it's completely fine to comment/uncomment code temporarily to work faster, but when you get around to creating a commit then these should be removed and only the final version should remain.

If you're commenting out parts of the code that you want to save for future reference, or for some other reason: you don't need to, you're using git! Git keeps track of all history - take advantage of that and don't be afraid to delete unused code!

https://github.com/ghazalghorabi/TDA553-lab1/blob/9a7bb11cad1ca4ae09a075ccccd54899b74953ad/src/Car.java#L95-L97 https://github.com/ghazalghorabi/TDA553-lab1/blob/9a7bb11cad1ca4ae09a075ccccd54899b74953ad/src/Saab95.java#L6 https://github.com/ghazalghorabi/TDA553-lab1/blob/9a7bb11cad1ca4ae09a075ccccd54899b74953ad/src/Saab95.java#L11