Welcome!
Fork this repo for your homework submissions. After forking, please replace the contents of this readme file with information about your submission, including the name(s) of the students and any notes you need to leave for the graders.
Your homework submissions will consist of programs in the following languages. To keep things simple, there is a separate folder for each language.
- Homework 1 (Scripting): Lua, Python, JavaScript
- Homework 2 (Enterprise): Java, Kotlin, Swift
- Homework 3 (Theory): OCaml, Haskell, TypeScript
- Homework 4 (Systems): C, C++, Rust
- Homework 5 (Concurrency): Go, Gleam, Mojo
At each homework deadline, the graders will clone your repo and run the tests. I will be inspecting the source code, grading your work on style, clarity, and appropriate use of language idioms. Do not throw away points in these areas: use code formatters and linters. Please consider it a moral obligation to use these tools. Not doing so is a violation of professional ethics. You must respect the naming, capitalization, formatting, spacing, and indentation conventions of each language.
The test files are included in the repo already. They are available for YOU! They will help you not only learn the languages and concepts covered in this course, but to help you with professional practice. You should get accustomed to writing code to make tests pass. As you grow in your profession, you will get used to writing your tests early.
The test suites are run like so (assuming you have a Unix-like shell, modify as necessary if you have Windows):
lua exercises_test.lua
python3 exercises_test.py
npm test
javac *.java && java ExercisesTest
kotlinc Exercises.kt ExercisesTest.kt -include-runtime -d test.jar && java -jar test.jar
swiftc -o main exercises.swift main.swift && ./main
ocamlc exercises.ml test.ml && ./a.out
ghc ExercisesTest.hs && ./ExercisesTest
npm test
g++ -o exercises test.c exercises.c && ./exercises
g++ -std=c++20 -o exercises test.cpp exercises.cpp && ./exercises
cargo test
go test exercises_test.go exercises.go
gleam test
mojo test.mojo
Your grade is a reflection not only of your ability to sling code to pass existing tests, but also of your ability to construct software in a professional setting. Therefore, you will be docked points (sorry, but it has to be done) on your submission if you:
- Fail to follow any submission instructions, such as not replacing the contents of this readme file and not including the names of all participants of any group work.
- Push to your GitHub repository any file that does not belong (including but not limited to that silly
DS_Store
). Make sure all generated executables, intermediate files, third-party libraries, etc. are not committed. Your repo contents should be limited to your solution files, tests, configuration files, and.gitignore
files. - Fail to follow naming or formatting guidelines for the language you are writing in. Inconsistent indentation, for example, has no place in professional or student software. Neither does end-of-line whitespace, huge chunks of contiguous blank lines, and other types of messy coding practices that show friends, family, colleagues, and potential employers that you don’t care about your work.