mjgold / pro-engineering-katas

Katas - Professional Engineering

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Weekly Code Katas

A code kata is an exercise in programming which helps a programmer hone their skills through practice and repetition. Most of our katas are designed be completed in less than an hour by someone with appropriate prior knowledge.

Each week we'll release a new batch of katas designed to complement the concepts you'll need to work on your projects for that week. Katas are a great way to get the week started, test or verify your own understanding, and get quick feedback from your teachers.

We do not expect students to complete every kata every week, but you should be attempting as many as you can. Remember, the top priority is getting feedback from us, even if your code is incomplete.

Contents

  1. How to Approach Katas
  2. Getting Started
  3. Forking This Repository
  4. A Note on StackOverflow and Similar Sites

How to Approach Katas

If you have one thing in mind when working on these katas it should be this: we've never once encountered a student who asked for too much feedback. Not once.

Our goal is preparing these katas is not to ensure that you "get them right," but to establish well-calibrated and productive code→feedback→refactor loop. If you're not sure how to do that, here's a structure we recommend:

  1. Set aside a fixed amount of time: 30, 45, or 60 minutes
  2. Pick a kata that interests you
  3. Make as much progress as you can in that amount of time
  4. When time runs out, publish your code and ask us for feedback

As always, if you have any questions or feel stuck, you should drop a note in the #pro-engineering Slack channel. There are no rules against using Google or StackOverflow to help you with these katas, but please read our note on StackOverflow and similar sites first.

Getting Started

You need to be able to run Ruby code in order to do these katas. You may or may not have Ruby set up on your local computer. If you don't, read these instructions on setting up your local development environment. In the meantime, we recommend using repl.it's online Ruby environment. You can paste any of the code you see below into the left-hand pane you'll find there and click the "arrow" above it to run the code. The output will appear in the right-hand pane.

Forking This Repository

To get started, you need to create your own copy of the katas. To do this you need to fork the main repository. This will create a copy of the weekly-katas repository under your own GitHub account.

To do this, go to the weekly-katas repository on GitHub. In the upper-right hand corner you should see a button labeled "Fork", like this:

Fork button

Click the button and this will create a new repository under your own GitHub account. The number next to the button indicates how many times this repository has been forked, so it might be a different number.

A Note on StackOverflow and Similar Sites

With a little bit of Google-fu, you can easily find working Ruby code for many of our katas on sites like StackOverflow, especially the ones earlier in the workshop. It's not "against the rules" to copy and paste from StackOverflow, but don't do it blindly.

In particular, ask yourself two questions:

  1. Why am I doing this?
  2. Could I articulate what each line of code in this "solution" does?

If you're copying and pasting because you want to "get the answer", "finish the kata," or "not make any mistakes", please don't! The point of these katas is for you to develop habits that will serve you in the future, when the problems you're encountering will be much more complex. It'd be 100x better for you to ask for feedback on an incomplete, non-working kata than to ask for feedback on a working kata whose code you found on StackOverflow.

Better yet, try as hard as you can to get into a mindset where you're excited by the prospect of making a mistake. That's where learning happens! :)

That said, you know your own learning style better than we possibly could. Many students learn by first seeing working examples. We've tried to provide some, here, but it's never possible to cover every possible case beforehand. Sometimes you'll want to find examples on your own and use them once you fully understand them. That's where the second question comes in: can you really, truly articulate what each line of code in the example does?

About

Katas - Professional Engineering

License:MIT License


Languages

Language:Ruby 100.0%