School Projects
Capstone project
Instead of doing a thesis, our university requires us to make a capstone project. The project we were assigned was to create a platform that automatically evaluated student’s homework for the course ‘Introduction to programming in Python’. The project had the following requirements:
- Ranked students for different skill levels 1-9. And made them repeat questions if they were wrong.
- The problems were defined by the following:
- Inputs and outputs to determine if a solution is right.
- Forbid certain operators for cetrain problems. Ex. banned
for
in exercises that requiredwhile
. - Skill level of the problem.
- Allow for new problems to be uploaded by the Professor.
- The page can be accessed by students while inside the university.
Compilers project
Our project for the compilers class was to create a compiler for the C– language.
The language is a subset of C with:
- Function declarations and function calling.
- Variables and scoping.
- Types: Boolean, integer, void, double, string.
- I/O operations: Readline, Print.
An example program that calculates factorial:
int fact(int n) {
int result;
if (n == 1) {
result = 1;
} else {
result = n * fact(n - 1);
}
return result;
}
int main() {
int n;
n = readInt();
print(fact(n), "\n");
return 0;
}
The full project is in github
Terrain elevation generation
This project was made for the Multicore programming class. I was inspired by Dwarf Fortress terrain generation and wanted to investigate how it is made. After some investigation, I found out that unfortunately the algorithm is not easily paralelizable. Which is why I decided to go with a not as complex, but paralelizable algorithm, the Diamond-Square algorithm.
Generated terrain 1 | Generated terrain 2 |
---|---|
The project made us implement an algorithm with 3 different multi thread frameworks that we had learnt in class. I used:
- Java streams
- OpenMP with C++.
- SIMD instructions for x86 assembly.
The full project is again in github