One peace of advice for novice programmers:

Learn to throw code away. Learn to be ok with it. git reset --hard is your friend.

Your value is not the code you've written so far, but your problem solving process. You'll replace the code faster than you expect. 💚

@zkat this will teach you how to do reflog fast 😂

@zkat well, it depends but generally yeah, my mistake. Just wanted to joke about hard reset reflexes and regrets.

@zkat This toot serves as a reminder that you cannot do git reset --hard or even git commit --amend once your previous toot/commit is pushed.

@zkat if lines mattered they'd test typing speed in interviews

@tobypinder don't give them more shitty ideas. It's bad enough as-is

@zkat as a useful corollary: learn to work (much of the time) in chunks small enough to be thrown away painlessly.

@zkat Semi-related advice to novices: Don't be afraid to just delete code instead of commenting it out. More often than not you aren't going to need it and commented out code is just useless swamp to wade through.

When you do need it? That's when git is your friend and a small investment into learning git log (or gitk or your IDE's history views) and/or git annotate pay off big.

(It's git's job to track old junk for you, you don't need to do it with comments. 😄)

@max @zkat I comment out because I code the same way I do everything else in life ("I can't throw this out, I might need it later!").

So it accumulates until I finally realize it looks stupid and go in there with a mop and clean it all out :blobwhistle:

@polychrome @zkat On this episode of Hoarders: Code Hoarders! 🤣

Well, learn to comment things out until you're sure it's trash, but once you're sure it's trash, get rid of it

Sign in to participate in the conversation

On the internet, everyone knows you're a cat — and that's totally okay.