• Tag Archives Linux
  • Cpool Part 1

    Before coming to Epitech Barcelona I had some meetings. In these meetings the staff told me that the first 2 months of my exchange were going to be very difficult. Now that i have done it i can say for sure that they were not exaggerating. We were at school from 09:00 until 20:00 every day except on sundays. But even after school or on sundays you had to work on your code because you had to finish everything. You had daily tasks, weekly assignments and a so called: Rush on saturdays.

    Luckily part 1 only lasted for 3 weeks. In these three weeks we learned the fundamentals of C and Unix, in addition to that we also learned to make shell scripts, Makefiles and had learned to build our own library.

    Setup of Course

    During this course we could not use internet. We could only use man and other provided material.

    From the first day we started getting tasks: Daily tasks. These could be simple or very hard. Before the start of each day you would have to clone an empty repository from github. In this repository you had to push all your work. And if you had pushed it Epitechs own robot called: moulinet would check your work. Moulinet was and still is my biggest arch-enemy (btw). Because it checks for codestyle, the output of your program, your library, headerfiles and all else that was specified by the task. But only 1 little coding style mistake would not validate your whole day. If your codestyle was okay than it would check your output, and mulinet tests all possibilities so you should have tested your code thoroughly in order for it to pass all tests. Lets just say me and moulinet have some unfinished business.

    Unix

    We started the pool by learning some of the basic commands in order to use the GNU/Linux terminal. For me some commands were different because i use Arch (btw) and Epitech uses Ubuntu as their default distribution. This was luckily not that big of a challenge because of my other project this summer: switching from Windows to GNU/Linux. After learning the basic commands we learned how shell scripting works. Giving us the power to link multiple commands and maybe even automate some things. After this we moved on to learning C.

    Fundamentals of C

    We started off with the simple stuff. Variables functions etc. After this we learned how to make our functions recursive and after that learned about structs in C. After a while we had finished a lot of tasks. And in these tasks we would sometimes create functions that would be useful to us in the future. And with that said we learned how to create our own library that we would have to use for the rest of the semester. In this same day we also learned about headers and had to write a build.sh script that would build this library. After making the build.sh we learned how to create a Makefile to build our library. With this new knowledge we got to the topic of tests, more specifically unit tests and had to be able to run these tests with our Makefile. Then we learned how to use linked lists which we will use extensively throughout the semester and throughout our careers.

    After these difficult days we finally got to the end. We got some time off from campus but were advised to still work on our library. Because this is something that we will have to use a lot.

    Thoughts

    The Cpool part 1 was a very ‘interesting’ experience. I did not expect it to be so much work but in the end i think it is a good way to learn a new language. I’ve noticed with my other experiences in learning new programming languages that it always feels like we stay at the basics too long. Here we learned a completely new programming language and can now actually work on projects in 3 weeks.

    Thank you Epitech!

    https://github.com/tobisphere/epitech_lib


  • From Windows to Linux

    Since some time ago i have been wanting to de-capitalize my life and transition to a life only consisting of open-source solutions.

    This idea has been lingering because of my work at Worm Rotterdam, we use GNU/Linux to run most things and it forced me to understand GNU/Linux.

    I got more and more comfortable with GNU/Linux and started doing some other projects. Like using a raspberry pi to mine crypto, or using my raspberry pi to block ads on my home network with pi-hole.

    Seeing the power it could give me i got more and more invested into GNU/Linux and got me in a rabbit hole on different GNU/Linux distros and their pros and cons.

    Later i had to make some old pc’s work ready for colleges, and could use this knowledge to my advantage by installing Linux Mint on them.

    And because of other projects i also started installing Ubuntu Server on some pc’s.

    All this made me realize how easy it is to just switch and it made me also wanna do it with my own devices.

    The last push i needed was that i will start doing a minor in Barcelona where i will learn the programming language C and to use Unix.

    The school told me i will probably have to dualbooth my windows laptop so i have GNU/Linux on it aswell.

    Hearing this got me thinking: If i just already have GNU/Linux and get even more comfortable with it, it will probably give me a head start.

    The transition

    So i decided i would install a GNU/Linux distro on my own laptop.

    The first step was to choose what distro would be best suitable for me.

    After alot of research i decided to go with Arch + wayland.

    Arch is for users that like to have full control and are willing to spend time on fixing things. It has a rolling release and ….

    But before i could install it i had to:

    • make a list of the applications i use on windows so i can reinstall it on GNU/Linux
    • make a backup of my files and projects
    • save the windows key and disable it

    And now that i had done these things i was ready to install Arch.

    Online i saw the horror stories of installing this distro and i was very nervous.

    But it was actually quite easy, i did some research beforehand and saw that i could use archinstall which made it 10x easier.

    I also did it while following a tutorial on youtube and having the arch installation guide right next to that.

    In about 3 hours i had my laptop run arch without errors.