|
| 1 | +--- |
| 2 | +title: "Optional Exercises for Section 1" |
| 3 | +start: false |
| 4 | +teaching: 0 |
| 5 | +exercises: 45 |
| 6 | +questions: |
| 7 | +- "How can I further finetune my coding environment?" |
| 8 | +objectives: |
| 9 | +- "Explore different options for your coding environment." |
| 10 | +keypoints: |
| 11 | +--- |
| 12 | + |
| 13 | +This episode holds some optional exercises for section 1. |
| 14 | +The exercises have an explorative nature, so feel free to go off in any direction that interests you. |
| 15 | +You will be looking at some tools that either complement or are alternatives to those already introduced. |
| 16 | +Even if you find something that you really like, |
| 17 | +we still recommend sticking with the tools that were introduced prior to this episode when you move onto other sections of the course. |
| 18 | + |
| 19 | +> ## Exercise: Apply to your own project(s) |
| 20 | +> |
| 21 | +> Apply what you learned in this section to your own project(s). |
| 22 | +> This is the time to ask any questions to your instructors or helpers. |
| 23 | +> Everyone has different preferences for tooling, so getting the input of experienced developers is a great opportunity. |
| 24 | +> |
| 25 | +{: .challenge} |
| 26 | + |
| 27 | +> ## Exercise: Try out different Integrated Development Environments |
| 28 | +> |
| 29 | +> Install different Integrated Development Environments (IDEs) and test them out. |
| 30 | +> Which one do you like the most and why? |
| 31 | +> |
| 32 | +> You can try: |
| 33 | +> |
| 34 | +> - [Visual Studio Code](https://code.visualstudio.com/), with setup instructions [in the Extras of this course]({{ site.baseurl }}{% link _extras/vscode.md %}) |
| 35 | +> - [Atom](https://atom-editor.cc/) |
| 36 | +> - [Sublime Text](https://www.sublimetext.com/) |
| 37 | +> - [RStudio](https://posit.co/download/rstudio-desktop/) |
| 38 | +> |
| 39 | +> Technically, compared to PyCharm, the 'IDEs' listed above are source code editors capable of functioning as an IDE |
| 40 | +> (with RStudio as an example). |
| 41 | +> To function as an IDE, you have to manually install plugins for more powerful features |
| 42 | +> such as support for a specific programming language or unit testing. |
| 43 | +> What do you prefer, a lot of tooling out of the box or a lightweight editor with optional extensions? |
| 44 | +> |
| 45 | +> If you want an even more lightweight setup you can try out these configurable source code editors: |
| 46 | +> |
| 47 | +> - [Emacs](https://www.gnu.org/software/emacs/) |
| 48 | +> - [Vim](https://www.vim.org/) |
| 49 | +> |
| 50 | +{: .challenge} |
| 51 | + |
| 52 | +> ## Exercise: Customize the command line |
| 53 | +> |
| 54 | +> You can customize the command line or use alternatives to `bash` to make yourself more productive. |
| 55 | +> |
| 56 | +> - Try out [Bash Prompt Generator](https://bash-prompt-generator.org/), it lets you try out different prompts, |
| 57 | +> depending on the information you want displayed. |
| 58 | +> - Try out [z](https://github.com/rupa/z), a simple tool to more quickly move around directories. |
| 59 | +> - Try out [Z shell (zsh)](https://zsh.sourceforge.io/), a shell designed for interactive use. |
| 60 | +> - Try out [Oh My ZSH](https://ohmyz.sh/), which is a theming and package manager of the `zsh` terminal. |
| 61 | +> - Try out [fish](https://fishshell.com/), a smart and user-friendly command line shell. |
| 62 | +> |
| 63 | +{: .challenge} |
| 64 | + |
| 65 | +> ## Exercise: Try out different virtual environment managers |
| 66 | +> |
| 67 | +> So far we used `venv`, but there are other virtual environment managers for Python: |
| 68 | +> |
| 69 | +> - [Poetry](https://python-poetry.org/), which we will explore using in |
| 70 | +> [Section 4]({{ site.baseurl }}{% link _episodes/43-software-release.md %}). |
| 71 | +> - conda, which is part of [Anaconda Distribution)](https://www.anaconda.com/download). |
| 72 | +> |
| 73 | +> Anaconda is widely used in academia, but the current license does not allow use for research in most circumstances. |
| 74 | +> An open-source alternative is [mini-forge](https://github.com/conda-forge/miniforge). |
| 75 | +> |
| 76 | +{: .challenge} |
| 77 | + |
| 78 | +> ## Exercise: Customize `pylint` |
| 79 | +> |
| 80 | +> You decide to change the max line length of your project to 100 instead of the default 80. |
| 81 | +> Find out how you can configure pylint. You can first try to use the pylint command line interface, |
| 82 | +> but also play with adding a configuration file that pylint reads in. |
| 83 | +> |
| 84 | +>> ## Solution |
| 85 | +>> |
| 86 | +>> ### By passing an argument to `pylint` in the command line |
| 87 | +>> |
| 88 | +>> Specify the max line length as an argument: `pylint --max-line-length=100` |
| 89 | +>> |
| 90 | +>> ### Using a configuration file |
| 91 | +>> |
| 92 | +>> You can create a file `.pylintrc` in the root of your project folder to overwrite pylint settings: |
| 93 | +>> |
| 94 | +>> ``` |
| 95 | +>> [FORMAT] |
| 96 | +>> max-line-length=100 |
| 97 | +>> ``` |
| 98 | +> {: .solution} |
| 99 | +{: .challenge} |
| 100 | +
|
| 101 | +{% include links.md %} |
0 commit comments