experimenting with python
this is the version control tool... its a must have for any developer; and for the beginers this will give a good mechanism to connect with already written good codebases that you can use as a starting point here is the download page for Windows operating system = https://git-scm.com/download/win for other operating system options.. use https://git-scm.com/download
follow all default options and install git on your local machine once you finish installing, it is a good idea to reboot your machine and try out this tool from windows run command type "gitbash" and let it open the terminal window you can type "git --version" and see the output
this is an opensource tool (IDE) and a good one for Python.. its from IntelliJ Idea page link -- navigate down to see Community edition exe link install this tool with all its default options after install run pyCharm and create a new Project use the default main.py that it creates or add your new script files try out different python commands, functions and modules
it is a good idea to organize your folder structure-- it gives a good discipline as well will help for future references when you want to try out the same experiments after a period of time one example is C:/workspaces/<sample 01>
make use of the good code repositories from gitlab or similar areas here are few links
- a repo from myself:
git clone https://github.com/amitrajpurkar/playwithpy.git - a book reference for above exercises -- link here
- one more repo for same book
- good ref from Oleksii Trekhleb @uber: learn python repo
- https://github.com/virgili0/Virgilio
- on organizing code: https://guicommits.com/organize-python-code-like-a-pro/
- for book: Tiny Python Projects: code repo
- one graphics library: https://mcsp.wartburg.edu/zelle/python/
- API ref for above graphics lib: https://mcsp.wartburg.edu/zelle/python/graphics/graphics/index.html
- just like we say read, read, read...
- there is another saying as well practise, practise, practise
make use of this valuable documentation from Python itself
- documention home page = https://docs.python.org/3/
- library reference = https://docs.python.org/3/library/index.html
- language reference = https://docs.python.org/3/reference/index.html
- developer guide = https://devguide.python.org/
So what we learn in this step are the building blocks to understand Python
- data
- data types
- variables
- data structures
- Strings
- List, Arrays
- Set, tuples
- dictionaries
- instructions
- commands
- control structures
- if-else; if-elif-else; for; while
- sub-routines
- built-in libraries
After this, the next level up, is organizing code. There is a difference between scripts which are simple commands; they get executed sequentially from top to bottom as encountered in the file. Whereas programming addresses solving complex problems; modularizing related commands in functions; housing related functions in Classes; organizing modules; having unit tests for all functions; compiling code organized in modules into a package that can be shipped and executed and so on.
Out of these, developing a "function that does only one action" is key skill. It also helps write testable code (TDD); break the code into nouns and verbs