mkhoeini / how-to-code

Steps to take to make sure of the quality of your coding.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

how-to-code

  1. Think about what you want to code
  2. Create the github repository
  3. Choose a fitting name
  4. Choose private/public
  5. Choose a license
  6. Write down a README
  7. Open up a Trello board for your project
  8. Write tests for a feature
  9. Choose a task from your todos deck and move it to doing deck
  10. Write tests
  11. Try to pass the tests
  12. Profit!
  1. Think about what you want to code

These days it becomes increasingly easier to just start to code. People just get a stroke of an idea and then they open their code editor, search github, npm, pipy for relevant pieces of code and start to implement it. But it is not a good way. You should dedicate some time to think about what you finaly want to achieve, How the API will look like in the end, etc. even before you start to code.

2. Create the github repository

Nowadays, having a version controlled repository on a universally accessible hosting solution like github or bitbucket is almost mandatory from day zero. If you don't have a strong requirment to use something else, just go for the github.

2.1. Choose a fitting name

For the worse or better, the name of your repository actually affects its future. So don't just choose whatever.

2.2. Choose private/public

Unless you strictly can't have the code in the public, for example it belongs to an entity which doesn't allow you to publish the codes, choose public. Don't be afraid that your code gets reviewed. Also if you don't want any outside contribution you can just write it down in your readme. Don't make it private just because it is a personal project.

2.3. Choose a license

Open source is a virtue. If you're in doubt just go for the MIT license. If you can't decide, leave it but don't forget it. License actually matters.

3. Write down a README

http://tom.preston-werner.com/2010/08/23/readme-driven-development.html https://oncletom.io/talks/2014/okfestival/

README is the authoritative documentation to your code. The first thing anybody will see from your code is the README. And they will judge your code initialy by its README. But the README is not just for everybody else. By writing down your ideas beforehand, you enable yourself to spot the faults in your own ideas.

4. Open up a Trello board for your project

Trello greatly helps you in managing your tasks, remembering your ideas, properly plan for the future, and all in all shape and advance your code in the right direction. Breakup your ideas into features. Then for each feature add a task to todos. If your tasks are too general, don't worry. You can just break them apart later on. However, note that your Trello tesks don't contain implementation details.

5. Write tests for a feature

5.1. Choose a task from your todos deck and move it to doing deck
5.2. Write tests

decide on when would you consider this feature as done. See if you could describe the feature as a set of tests in a sane way.

6. Try to pass the tests

Write just enough code to pass the tests. Then go back to step 5.

About

Steps to take to make sure of the quality of your coding.

License:MIT License