Saturday, March 14, 2015

HACKING TIPS 1

If you're relatively new to programming

  • Choose a language and stick to it. Python or Ruby is probably best; JavaScript and many others are also ok.
  • Choose a text editor that is easy to learn and stick to it. If you're not sure which one to choose, Sublime Text is powerful, intuitive, and available on Mac, Windows and Linux.
  • Avoid large frameworks like Rails and Django until you've got a decent grasp on the language you're using.
  • Write lots of code. The specific code you write is less important than that you write lots of code.
  • Don't worry about choosing the "perfect" project. It's easy to let the perfect be the enemy of the good when it comes to project selection.
  • Have your code reviewed regularly, ideally by someone who knows the language you're working in well.
  • Pair program, ideally with people who know the language you're working in well.
  • Develop a good mental model of your code.
  • Become a systematic debugger.
  • Write small programs from scratch.
  • Give yourself progressively larger challenges. For example, write a project you think will take an hour, then an afternoon, then a day, then two days…
  • Become comfortable with your tools, but don't go overboard yak-shaving. Learn to use git, GitHub, a text editor and your language's debugger.
  • Avoid distractions.

If you already have a good grasp of at least one language

  • Learn a second (or third) language well, ideally one that's very different from the one you know best (e.g., if you know Python, it's probably more educational to learn Go or C or Scheme before you learn Ruby).
  • Have your code reviewed regularly.
  • Review other people's code regularly.
  • Pair with people of all skill levels. You can learn a lot pairing with people at or above your level, and pairing with people who aren't as experienced (having to explain things to someone else forces you to deepen and clarify your understanding of them).
  • Find the things you've always been a little scared of – e.g., multithreaded programming – and learn those (assuming they actually interest you).
  • Avoid distractions.

If you're really experienced

  • Contribute to open source projects, especially well-established ones with high code-quality standards.
  • Consider starting your own open source project. Two good ways to find ideas: Scratch your own itch, or factor out code you've written multiple times previously into its own library.
  • Continue doing most of the things above, including having your code reviewed by (and working with) stronger programmers. If you need help finding them, either inside or outside of Hacker School, we're happy to help.
  • Avoid distractions.

No comments:

Post a Comment