2023-11-15
So let's first go over the printf project. The goal was to recreate the famous printf function. This we can then use in our future projects. There are no real limitations and we could also use our own libft's for this project. I first started by making the main ft_printf function and then the formatter to check the type of conversion. When this was done I could move on and do every conversion one by one. I first started with the easy one's like printing a character, string, number and percentage sign. Then I still had the pointer address and hexidecimal to go. These were a bit harder but after checking out how hexidecimal numbers are constructed it all made a lot more sense and I could hack something togheter in less then 2 hours. It all worked perfectly except for the variadic list. Well it was the main new thing in this project and I mainly developed the project on macOS but the evaluation was on linux. So I needed a few changes to make it work on linux as intended. Those changes were moving to the next item in the va_list and also a null pointer should be displayed as (nil) and not as 0x0 on macOS. After these changes I was done and I was really happy with the result.
The project after that was my least favorite project till this day. Get next line is a project were you make a program that can read lines from a file on by one and return them. I found this a really hard project but actually once you get your head wrapped around it then it starts to make sense. The challenge in this project is that you are only allowed to have 3 files and only 2 of those are c files. With norminette that makes it a limit of 10 allowed functions. The new thing we could use it static variables and I love them. First I was really stressed about the functions limit but at the end I was just stressing for nothing because I only needed 7 functions to make it work. I first tried to make it with a linked list but then I thought to myself why not just use an array of strings. This made it a lot easier but I didn't saw it as a bad thing because I learned a lot about linked lists by trying to do it that way. At the end it all came together and I was really happy about the result.
So after these 2 projects I was ready to get on to the next circle. New challenges await and more concepts are ready to be explored. For the people interested my choices of projects will be push_swap, pipex and fdf. Also I can't forget to mention born2beroot. Well about that one I'm happy it's not a long project because I didn't really like it. But since then I'm using a lot more virtual machines and I also setup a few servers. So it was very helpfull actually. I hope you guys enjoyed reading this blogpost and if you are interested in my code it is all on my github. Till next time!