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. 💚
Piece of advice* my goodness, auto correct
@zkat this will teach you how to do reflog fast 😂
@charlag reflog can't save you from a hard reset
@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 fizzbuzz done quick
@zkat If it does not spark joy throw it out
@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. 😄)
@zkat oh is that why i have 30 old unused branches
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
The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!