Skip to content

Instantly share code, notes, and snippets.

@maryrosecook
Last active September 13, 2018 18:17
Show Gist options
  • Save maryrosecook/10da40d8275563b6462c to your computer and use it in GitHub Desktop.
Save maryrosecook/10da40d8275563b6462c to your computer and use it in GitHub Desktop.
Reminders to myself to help me get better at programming. I don't always manage to do these things, but I try. Please feel free to add your own reminders to yourself in the comments below!
@dillonforrest
Copy link

  • The only code guaranteed to work correctly is code which is not written.

@tikitu
Copy link

tikitu commented Sep 4, 2015

When you're unsure where you're going (e.g. debugging, trying a new technique, brainstorming ideas): record what you're trying, even when it's not complete or doesn't work out. Write the steps down, or catch them in version control. It's good for retracing what you did when it does work, and can also help you avoid going around in circles.

@rosamcgee
Copy link

  • The amount of time you spend waiting for the right answer to magically appear in your brain would be better spent sketching out the flow of your data. Pick up a pen and paper and give it a hand.

@al2o3cr
Copy link

al2o3cr commented Sep 4, 2015

Whenever you change a piece of code, have an idea about what it will change ("tests X, Y, and Z will now fail", or even "it should blow up in a different spot"). If you make the change and something ELSE happens, go find out why: that's evidence that your understanding of the system is incomplete, and changing things in that state is a great way to get more confused.

Addendum: before making a significant change, apply this philosophy and make a trivial change (drop a raise 'yup' or equivalent in the place you're thinking about editing and verify that things break in the way you expected. Nothing worse than editing code that isn't actually involved and trying to decipher why nothing's changing. :)

@carlisia
Copy link

Committing all the time (and having mastered the main git functionalities) helps me get better at programming. I love it that I don't even have to think about "the perfect" commit message, given that I can rebase -i and squash commits, as well as amend commit messages and descriptions when I'm ready. It gives me the freedom to go ahead and not worry about the "very best" way of doing something, with the confidence that I have clean code waiting for me right at the prompt with a quick git command. This gives me the freedom to branch out into different things (to be merged later if I want to), which leads me to fail and learn fast, all the while not loosing productive work, which is, in the end, what concretely leads me to become better.

And 👍 for all the comments on this thread.

@wheaties
Copy link

Don't be scared to make mistakes.

Don't be afraid to admit when you have.

@thenickcox
Copy link

Hey, @maryrosecook! These are great. One thing I need to keep reminding myself – that I hope would be helpful to others – is: prove it. There are so many times when something seems to be the case, and I tend to be satisfied by my hypothesis, but I've been wrong a lot in ways that have sometimes been costly. The learning here is to build a case for why you think something is the way it is: get support from the server logs, or some code in the REPL, or the console. Don't just assume that the most likely answer is the right one. Show factual evidence to support it.

@seanpat09
Copy link

Dear Future Sean,

First off, sorry for all of the bugs, poor design choices, and overall sloppy code. I couldn't prevent that, I was still learning. I'm especially sorry for all the technical debt I've accumulated. I could have prevented that, but chose not to for whatever reason.

While you are fixing my mess, just remember that the only reason that you can is because you are better than me. Remember how hard we thought that first programming interview test was while we churned on it for 3 days? We could probably do it in a few hours now; you might be able to do it in even less. (Reminder: You should try doing that!)

So keep learning, keep writing code, and keep writing about code. I'm really excited to see where we end up going.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment