Skip to content

Latest commit

 

History

History
executable file
·
44 lines (29 loc) · 2 KB

File metadata and controls

executable file
·
44 lines (29 loc) · 2 KB

Contributing and Learning

First of all, A thanks a lot for deciding to contribute here.

So yes, that's my title, It's not just contributing but learning as well. Please feel free to suggest edits or adding a program for anything you would like to have a program about.

Also, I highly recommend going through the Open Source Guide on how to contribute to any open source project.

So now, the question is how do you learn writing program if you can just copy paste from here OR anywhere else for that matter. Well, let me tell you my way of learning.

  • Understand the problem first

    Yes, before you write any piece of code. First take a piece of paper (or write it in your laptop or computer), and write out the pseudo code for the problem in points (a rough sketch of the program). The way I do is write the pseudo and then while doing the actual coding I write the logic for each pseudo point.

    For example, for writing a python program for rock paper scissor game,

    # Rock Paper Scissor game
    # - Ask user input
    # - Create list of choices
    # - Create rules
    ...

    And then while coding ...

    ...
    # Create list of choices
    game_choices = ['Rock', 'Paper', 'Scissor']
    
    # Create rules
    ...
  • Google the program and save the code as a benchmark for comparison

    But then again, why shouldn't I just copy paste instead of wasting time typing all that code. I would say no, learning is never wasting time. You only learn by doing, not by viewing. Take out time for doing all this.

  • After you've done writing your piece of code. Compare your's with the copy you googled.

    Compare, not as in line by line comparison, rather understand how the googled program is written vs the one you've written.

    Like for example, what api's are being used in the google copy, how loops are handled, use of various libraries, etc. Both the programs have the same logic written, however the different lies in the way it's written.