Frontend Programming Exam
Frontend Programming Exam
Aliaksei Miniukovich
Oral Exam
C 2
Group Formation, 5min
1. Go to https://t.ly/IsaKM
2. Sign up yourself and your group member
3. Make sure there aren't duplicates
4. Exactly 3 members per group
C 3
Project Description
C 4
Project Description, for E
1. Command-line game:
1. Pick randomly a city from a list (create your own list)
2. Ask the user to guess the temperature in the city now
3. Read the user's guess in a variable
4. Send a request to a weather API to get the actual temperature
5. Compare the actual with the guessed temperature: if the
difference is less than (say) 5 degrees C, say the user has won;
else say the user has lost
6. Ask the user if they want to play again
7. If yes, repeat from 1; else say goodbye and quit your program
C 5
Project Description, for D
1. Same as E, but as a webpage generated by Bash
1. The webpage needs to be hosted on Apache (see Oblig 1)
2. Your bash script generates the page
3. The page has a simple form with a numeric <input>
4. The user enters their guess and clicks submit
5. Your script handles a POST request, checking the weather for
the right city
6. Your script then generates a message (Won or Lost)
7. Under the message, it also shows the same form to play again
C 6
Add one or more features, for D+
1. Login functionality
1. Add another webpage with login and/or sign-up functionality (e.g.,
collect username, password, country of origin, and preferred units)
2. Save new users in a text table on server
3. Use the "Set-Cookie" HTTP header to tell the browser which user
it is after the login/signup
4. Use the "Cookie" HTTP header from the browser to find out
which user it is
5. Display username during playing
6. Remember if the user prefers Celsius or Fahrenheit (chosen during
registration)
C 7
Add one or more features, for D+
C 8
Add one or more features, for D+
3. Script to auto-deploy your site on a new machine
1. Asking the user what name they want for their site and where to
save the site
2. Copying site files to the chosen location
3. Creating a .conf file for Apache with a virtual host (with the right
location and hostname)
4. Giving the right permissions for the site files (e.g., to make them
executable)
5. Adding a line to the "hosts" file with the chosen hostname
C 9
Add one or more features, for D+
4. Cronjobs
1. Every 5 minutes, log CPU usage and disk space availability in a file
2. Every 30 minutes, request the temperature data for each of the
cities and save it as a local file; Use that local file instead of
querying the weather API every time
3. Every minute, check if Apache is running without issues; if not,
log the time it started and then log the time Apache is back to
running
C 10