So CS 50 has officially begun. Time to get my computer ready for the work.
The installation and use of the appliance is covered in great detail on the coursepages, so there is no need to describe it here. What I do different is that I plan to work mostly outside of the appliance, because my computer is barely able to run it and it is a pain in the backside to use it for longer periods (It’s an old laptop, that wasn’t powerful even when it was new.).
Since I am using Linux on my computer as the main operating system, setting it up for coding is not so big a task. Most of the packages are allready installed by me (the most important would be “build-essential”, a metapackage, that brings compilers and stuff). Getting the functions from CS 50 to work is another thing.
First I followed the instructions on the manual for the CS 50 libraries. It was a lot of copy/pasting, but in the end the libraries in all four languages worked fine.
After that, I began to search for instructions for the other tools of the appliance, most important the check50 script. A nice blogpost on medium showed me where to look, but sadly the mentioned git-repository was deleted since then. I found a copy of it on github and tried to install it. Worked fine. But the most interesting part of it was the question: will it work with the current course?
For convenience I quickly made alias for it:
After that, I tried the example code from the coursesite:
1 2 3 4 5 6
This compiled without visible errors, but when I made the compiling a little more verbose, I got this:
1 2 3 4 5 6
One line more and the more verbose compiling also went on without errors:
1 2 3 4 5 6 7
Time to use the code to test the check50 function with the new course:
1 2 3 4
That went well. It seems like I am ready to dive into the coding problems and need only use the appliance for submitting the solutions. On the side, I have become somewhat comfortable with the functions, that Octopress provides for embedding code into blogposts.
If you want your c compiler to work exactly like the one in the appliance, you will have to first install the clang compiler and then set a few variables for your shell. You best do the latter in your .bashrc:
1 2 3