.. _appendix-software: Appendix: Course Software ------------------------- You can choose either or both of the following options. Cloud-based development environment ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This option is recommended if you have any problems with your local setup or if you prefer a basic cloud-based setup. Pros ```` - consistent, cloud-based environment Cons ```` - requires good network connection - might lack code completion - free plan might be underresourced (CPUs, RAM, disk space, etc.) - won't support GUI or mobile development out of the box Zero-install option: Scastie ```````````````````````````` Scastie is an interactive playground for Scala with support for Scala 3 and sbt (Scala Build Tool) configuration. It allows you to save code snippets to your GitHub account, which you can access later. It is not suitable for working on full-fledged Scala projects, however. To launch, visit https://scastie.scala-lang.org. Be sure to - choose target Scala 3 and Scala version 3.3.0 - add the following `scalacOptions` under build settings:: "-Yexplicit-nulls", "-language:strictEquality" Gitpod (recommended) ```````````````````` Gitpod is a cloud-based development environment based on Visual Studio Code running on Ubuntu LTS. To launch, visit https://gitpod.io and log in using your GitHub account. - The first time around, create a new workspace and select the GitHub project (or paste the URL of a GitHub project) you want to work on in the new workspace; you should see this kind of configuration page: .. image:: images/gitpod.png - When you visit Gitpod again, your GitPod landing page will show your existing workspace(s) along with the option to create a new one. - For each new workspace, using the installed `SDKMAN! `_, perform a one-time installation of java and `sbt `_ (unless the project is already configured to perform these steps automatically). - The VS Code Scala and Metals extensions seem to get installed automatically; otherwise you can install them manually along with any other desired extensions. - Now you should be able to work on the project by using the hamburger menu in the top left corner to open a terminal and following the instructions in the included README. Locally installed development environment ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This option will give you an advanced development environment with code completion, type info, etc. Pros ```` - provides powerful capabilities, including code completion - does not require network connection once installed Cons ```` - might be slow on older machines - need to maintain on each machine you use - it can be challenging to match the versions of the various packages Required packages ````````````````` - `Java 17 and/or newer JDK `_ - `Git `_ distributed version control system (usually preinstalled on Mac OS and Linux) - recommended installation option on Windows: *Use Git and optional UNIX tools from the Windows Command Prompt* - optional on any plaDecimaltform, especially when not using IntelliJ IDEA: `some GUI-based Git client `_ - `sbt `_ Scala build tool - `VisualVM `_ visual heap profiling tool - *Mac and Linux users are strongly encouraged to use* `SDKMAN! `_ *to manage their Java, sbt, VisualVM, and other command-line development tools.* Choices of development environments ``````````````````````````````````` - `IntelliJ IDEA CE `_ integrated development environment (recommended) - check specific prerequisite details for your platform - for the following steps, make sure you have no projects open and are looking at the welcome window as in the attached screenshot - *Scala plugin installation:* IntelliJ IDEA > Configure (bottom right) > Plugins > Browse repositories > find and right-click Scala > download and install > close repository browser > OK to restart IDEA Because Scala 3 is still evolving, JetBrains recommend setting the IntelliJ Scala plugin to the nightly channel for more frequent updates. For details, visit `this blog post `_. - *JDK configuration*: IntelliJ IDEA > Configure > Project Defaults > Project Structure > Platform Settings > SDKs > + > JDK > navigate to the installation directory of your most recent JDK > OK - `Visual Studio Code `_ alternative based on your preference and/or experience - it should offer to install Scala support when you open a Scala project folder for the first time - `discussion of IDEA vs VS Code for Scala development `_ - conventional text editor - Emacs - vim - etc. sbt optional plugins ~~~~~~~~~~~~~~~~~~~~ This section applies to all uses of sbt, whether cloud-based or on the local command line. These are useful additional sbt plugins. `You can install them per project or globally. `_ Many of the example projects already come with one or more of these plugins (especially the first two). - `sbt-native-packager `_: creates a script for running your app outside sbt - `sbt-scoverage `_: uses Scoverage to produce a test code coverage report - `sbt-updates `_: checks central repos for dependency updates - `sbt-scalafmt `_: automatic source code formatting using `Scalafmt `_ - `scalastyle `_: static code checker for Scala - `wart remover `_: code linting tool (another static checker) GitHub ~~~~~~ `GitHub `_ is a provider of hosted Git repositories, which emphasizes community and collaboration. For this reason, we use it to host our course examples. - Create a GitHub account if you don't already have one. - Get the `GitHub Student Developer Pack `_ using your official ``@luc.edu`` address. This will give you free unlimited private repositories. - Find and follow a few practitioners you respect. For example, I follow `these developers `_. You'll probably recognize a number of them. - Review `these notes `_ to understand the community-based development process. - For credit toward class participation, create some meaningful `GitHub issues `_ and/or `GitHub pull requests `_ for one or more of our `course examples `_. (Make sure to navigate to the original repos as these forks do not have their own issue trackers). These can be functional or nonfunctional enhancements, requests for clarification, etc. - To enhance your visibility in the professional community, start doing the same for some open-source projects you are interested in. You may find both of these cheat sheets useful: - `GitHub `_ - `GitLab `_ (includes useful diagrams) Remote participation ~~~~~~~~~~~~~~~~~~~~ This software allows you to participating in class remotely in case of weather emergencies, pandemics, etc. For security and privacy reasons, be sure to update it frequently. - `Zoom `_ In case of a Zoom outage, we will fall back to MS Teams chat and reorganize from there.