Skip to content

Instantly share code, notes, and snippets.

@jiribenes

jiribenes/hw0.md Secret

Created October 18, 2023 08:25
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jiribenes/b924041030feda5aa22d43270265f292 to your computer and use it in GitHub Desktop.
Save jiribenes/b924041030feda5aa22d43270265f292 to your computer and use it in GitHub Desktop.
Software Engineering - Hausaufgabe #0 / Homework #0

English version below.

Hausaufgabe #0 - Erste Schritte

Lernziele: Nach der Bearbeitung dieses Arbeitsblattes haben Sie:

  • einen GitHub-Account erstellt
  • einen Account im ps-forum erstellt
  • einen Account im se-dashboard erstellt
  • die Umfrage zur Tutoriumsanmeldung ausgefüllt
  • git installiert und eingerichtet
  • Ihren ersten Commit erstellt
  • gelernt, Repositories von GitHub mittels SSH zu clonen
  • sbt installiert und eingerichtet
  • eine Scala-Entwicklungsumgebung eingerichtet

Beachten Sie: Auch wenn es für dieses Blatt keine separate Abgabe gibt, ist es unabdingbar, dass sie es vor Freitag 20. 10. 23:59:59 bearbeiten, um einen Tutoriumsplatz zu erhalten und zukünftige Hausaufgaben bearbeiten zu können.

Website der Veranstaltung: https://se.informatik.uni-tuebingen.de/teaching/ws23/se/

Aufgabe #1 - GitHub-Registrierung (⏱ 5 min)

Ziele:

  • Sie haben einen GitHub-Account und kennen Ihren Nutzernamen und Ihr Passwort

Wir werden GitHub sowohl für die Abgabe der Hausaufgaben als auch zur Zusammenarbeit an Projekten während des Semesters verwenden. Wenn Sie bereits einen GitHub-Account haben, Ihre Logindaten kennen, und diesen für diese Veranstaltung verwenden wollen, können Sie dies tun und diese Aufgabe überspringen.

Achtung: Ein Account auf einer anderen git-Hosting-Plattform (Gitlab, Bitbucket, ...) ist hierfür nicht ausreichend.

Tun Sie folgendes: Erstellen Sie einen GitHub-Account

Aufgabe #2 - Registrierung im Forum und Übungsgruppenanmeldung (⏱ 10 min)

Ziele:

  • Sie wissen, wo Sie das ps-forum finden
  • Sie haben einen Nutzeraccount für das Forum und kennen Benutzername und Passwort
  • Sie haben die Felder github und matrnr korrekt ausgefüllt

Bitte bearbeiten Sie zunächst Aufgabe 1, da Sie für diese Aufgabe Ihren GitHub-Nutzernamen benötigen.

Wir werden das Forum unter https://ps-forum.cs.uni-tuebingen.de/ zur Kommunikation verwenden, z.B. werden wir dort Ankündigungen veröffentlichen und Ihre Fragen beantworten.

Tun Sie folgendes:

  1. Besuchen Sie https://ps-forum.cs.uni-tuebingen.de
  2. Klicken Sie auf "Registrieren", um sich Ihr eigenes Nutzerkonto anzulegen.
  3. Tragen Sie Ihre Benutzerdaten ein.
    • Besonders wichtig sind die Felder Benutzername und Passwort, die Sie für das Forum verwenden. Merken Sie sich diese.
    • Stellen Sie sicher, dass Sie Ihren GitHub-Nutzernamen (vgl. Aufgabe #1) unter github sowie Ihre Matrikelnummer unter matrnr angeben.
  4. Klicken Sie auf "Benutzerkonto erstellen". Sie erhalten nun eine Bestätigungsemail mit einem Link, durch welchen Sie Ihr Konto aktivieren können.
  5. Wenn Sie Fragen bezüglich der Veranstaltung haben ist das Forum die erste Anlaufstelle. Zögern Sie nicht hierfür ein eigenes "Thema" zu erstellen.

Aufgabe #3 - Registrierung im SE Dashboard und Übungsgruppenanmeldung (⏱ 15 min)

Ziele:

  • Sie wissen, wo Sie das se-dashboard finden
  • Sie haben einen Nutzeraccount für das SE Dashboard
  • Sie haben in der Umfrage zur Übungsgruppenanmeldung die für Sie möglichen Termine ausgewählt.
  1. Besuchen Sie https://kamino.cs.uni-tuebingen.de
  2. Klicken Sie auf "Sign in with Github", um sich Ihr eigenes Nutzerkonto anzulegen.
  3. Erlauben Sie den Zugriff auf das GitHub-Konto, das Sie in Aufgabe 1 erstellt haben.
  4. Füllen Sie das Registrierungsformular mit Ihren Benutzerdaten aus.
    • Der Forum username ist der Benutzername, den Sie für das ps-forum gewählt haben, die Student email ist die E-Mail, die Sie von der Universität erhalten haben (mit der Endung uni-tuebingen.de)
  5. Klicken Sie auf der Hauptseite auf "✏️ New Vote", um für die Tutorien zu stimmen, die für Sie in Frage kommen, und klicken Sie auf "Submit".

Aufgabe #4 - git einrichten (⏱ 15 min)

Ziele:

  • Sie haben git installiert und eingerichtet
  • Sie haben ein Repository erstellt
  • Sie haben einen Commit erstellt

Git ist eine Versionskontrollsoftware, über die Sie in der ersten Vorlesung sprechen. Sie wird auch verwendet werden, um Abgaben via GitHub zu tätigen und mit anderen Mitgliedern Ihrer Übungsgruppe an Projekten zu arbeiten.

Tun Sie folgendes:

  1. Installieren und einrichten Sie git
  2. Erstellen Sie ein neues Verzeichnis my-first-git-project und öffnen Sie darin eine Kommandozeile.
  3. Führen Sie den Befehl git init aus, um ein neues Repository zu erstellen
  4. Erstellen Sie in dem Ordner eine Datei mit dem Namen hello.txt mit beliebigem Inhalt.
  5. Führen Sie git add hello.txt aus, um die Datei zur Staging Area hinzuzufügen.
  6. Führen Sie git commit -m "My first commit!" aus, um einen Commit zu erstellen.

Aufgabe #5 - Einen SSH-Schlüssel einrichten (⏱ 15 min)

Ziele:

  • Sie haben SSH eingerichtet
  • Sie haben einen SSH-Schlüssel erstellt, mit Git eingerichtet und ihn zu Ihrem GitHub-Account hinzugefügt
  • Sie haben das helloworld-Repository geclonet

Um mit git-Repositories auf GitHub arbeiten zu können, müssen Sie einen SSH-Schlüssel einrichten.

Achtung HTTP funktioniert zwar, um ein Repository zu clonen, wird aber für spätere Aufgaben nicht funktionieren; Sie benötigen zwingend einen SSH-Schlüssel.

Tun Sie folgendes:

  1. Richten Sie SSH ein, erstellen Sie einen Schlüssel und richten Sie diesen zur Benutzung mit Git und GitHub ein
  2. Öffnen Sie eine Kommandozeile
  3. Führen Sie git clone git@github.com:se-tuebingen-exercises-ws23/helloworld aus, um eine Kopie des Beispielrepositories zu erhalten
  4. Das sollte ein neues Verzeichnis erstellen. Dieses sollte nicht leer sein, aber Sie müssen den Inhalt noch nicht verstehen

Aufgabe 6 - Einrichtung von sbt (⏱ 10 min)

Ziele:

  • Sie haben sbt installiert und eingerichtet
  • Sie haben die Meldung erhalten, dass alles korrekt eingerichtet ist

sbt ist ein Buildsystem, das für Scala populär ist. Wir werden es für die Projekte verwenden, an denen Sie in dieser Veranstaltung arbeiten.

Tun Sie folgendes:

  1. Installieren Sie ein JDK und sbt
  2. Öffnen Sie eine Kommandozeile in dem Ordner helloworld aus Aufgabe #4.
  3. Führen Sie sbt run aus.
    • Dies sollte Sie in der Kommandozeile nach Ihrem Namen fragen. Geben Sie diesen ein und drücken Sie die Entertaste
    • Sie sollten nun eine Meldung erhalten, dass Sie alle Dependencies korrekt eingerichtet haben.

Aufgabe #7 - Eine Scala-Entwicklungsumgebung einrichten (⏱ 15 min)

Ziele:

  • Sie haben eine Scala-Entwicklungsumgebung eingerichtet
  • Sie haben das helloworld-Projekt geöffnet

Richten Sie sich eine Scala-Entwicklungsumgebung ein entsprechend einer der folgenden Anleitungen. Wählen Sie eine der folgenden IDEs und installieren Sie sie. Es ist nicht erforderlich, beides zu installieren:

Öffnen Sie das helloworld-Beispielprojekt, um sicherzustellen, dass alles korrekt eingerichtet ist.


Deutsche Übersetzung oben.

Homework #0 - Basics

Learning objectives: After finishing this homework, you will

  • have created a GitHub account
  • have created an account for the ps-forum
  • have created an account for the se-dashboard
  • have filled out the poll for the tutorials
  • have setup git
  • have made your first commit
  • be able to clone repositories from GitHub using SSH
  • have setup sbt
  • have setup a Scala development environment

Warning Although there will be no hand-in for this homework, it is vital that you complete it before Friday 20th 23:59:59 in order to get a tutorial slot and be able to do future homework.

Course website: https://se.informatik.uni-tuebingen.de/teaching/ws23/se/

Task #1 - GitHub registration (⏱ 5 min)

Goals:

  • You have a GitHub user account and know your username and login

We will use GitHub both for handing in homework and to work on projects during the course. If you already have an account on GitHub, know your login data, and want to use it for the course, you can do so and skip this task.

Note An account on some other git hosting site (Gitlab, Bitbucket, ...) will not be sufficient.

Do the following: Create a GitHub account.

Task #2 - Forum and tutorial registration (⏱ 10 min)

Goals:

  • You know where to find the ps-forum
  • You have created a user account and know the login data
  • You have filled out the github and matrnr fields

Please do Task #1 first, as you will need your GitHub username for this task.

We will use the forum at https://ps-forum.cs.uni-tuebingen.de/ for communication regarding the lecture, e.g. publish lecture materials, make announcements and answer questions.

Do the following to register for the forum:

  1. Visit the forum at https://ps-forum.cs.uni-tuebingen.de/
  2. Click "Registrieren" to create a user account
  3. Fill out the form with your user data.
    • Benutzername and Passwort are especially important, make sure to remember them as they're needed for the forum, where we will publish lecture materials.
    • Also make sure to enter your Github username for github (see Task #1) and your matriculation number for matrnr.
  4. Click "Benutzerkonto erstellen". You will now receive a confirmation email with a link to activate your account.
  5. You can use the forum to ask any questions regarding the SE lecture. Don't hesitate to create a new topic for it.

Task #3 - Dashboard and tutorial registration (⏱ 15 min)

Goals:

  • You know where to find the se-dashboard
  • You have created a user account
  • You have selected all possible dates for your tutorial and submitted the poll

Please do Tasks #1 and #2 first, as you will need your GitHub username and ps-forum username for this task.

We will use the dashboard at https://kamino.cs.uni-tuebingen.de/ to distribute the homework.

Do the following to register for the dashboard and tutorials:

  1. Visit the dashboard at https://kamino.cs.uni-tuebingen.de/
  2. Click "Sign in with GitHub" to create a user account
  3. Allow access to the GitHub account you created in Task #1.
  4. Fill out the registration form with your user data.
    • Forum username is the username you selected for the ps-forum, Student email is the email provided to you by the university (ending with uni-tuebingen.de)
  5. On the main page, click "✏️ New Vote" to vote for the tutorials that would be possible for you and click "Submit"

Task #4 - Set up git (⏱ 15 min)

Goals:

  • You have installed and configured git
  • You have created a new repository
  • You have made a commit

Git is a version control software that you learn about in the first lecture. It will also be used to hand-in assignments via GitHub and to work on projects with the other members of your tutorial.

Do the following:

  1. Install git and set-up your git configuration
  2. Create a new folder named my-first-git-project and open a terminal there.
  3. Run git init to create a new git repository
  4. Create a file named hello.txt in the folder and write something into it.
  5. Run git add hello.txt to add the file to the staging area
  6. Run git commit -m "My first commit!" to create a commit

Task #5 - Set up a SSH key (⏱ 15 min)

Goals:

  • You have setup SSH
  • You have generated a SSH key and added it to your GitHub account
  • You have cloned the helloworld repository

To work with Git repositories on GitHub, you will have to use SSH.

Warning Using http will work for cloning but will not work with later tasks, so you need to setup SSH.

Do the following:

  1. Set up SSH, generate a key and set it up for usage with git and github
  2. Open a terminal window
  3. Run git clone git@github.com:se-tuebingen-exercises-ws23/helloworld to get a copy of the example repository
  4. This should create a new directory helloworld. It should be non-empty, but you don't need to understand the contents yet.

Task #6 - Set up sbt (⏱ 10 min)

Goals:

  • You have setup sbt
  • You have seen the message that everything is setup correctly

sbt is a build system popular for Scala development. It will be used to build the projects you work on in the course.

Do the following:

  1. Install a JDK and sbt
  2. Open a terminal in the folder helloworld created in Task #4.
  3. Run sbt run.
  • This will ask for your name on the terminal. Type in your name and press ENTER.
  • Then, you should see a message saying that you have setup all dependencies correctly.

Task #7 - Set up a Scala development environment (⏱ 15 min)

Goals:

  • You have setup a Scala development environment
  • You have opened the helloworld project

Set up a Scala development environment as described in one of the following guides. Choose one of the following IDEs and install it. There is no need to install both:

Then, open the helloworld example project to make sure everything is setup correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment