Skip to content

Latest commit

 

History

History
109 lines (89 loc) · 6.05 KB

README.md

File metadata and controls

109 lines (89 loc) · 6.05 KB

GitHub code size in bytes GitHub top language GitHub last commit GitHub Lines of Code

Table of contents TOC

What is libft

Libft is the continuiation of what students learned in their 42piscine, the initial qualification phase for the school.

Libft is a project where students build their very first C library. The students learn more about the infrastructure and organization of C. They learn about static libraries, what they are, how they are compiled, and how others can use them. Furthermore, the students gain hands-on experience with Makefiles in order to build their library.

The library itself is a collection of functionality mostly focused on input/output operations, but it also includes memory manipulation and an implementation of a linked list. Throughout the course, it will serve as a replacement for stdio, and the students are required to use it and expand it for further use (ft_printf, get-next-line).

Moreover, the students are exposed to extensive testing and are required to test their code at a very early stage. In that sense, it is just a continuation of what they were already exposed to during the piscine. The moulinette is a very meticulous program that every student needs to submit their code to. This teaches the students to be extremely rigorous and attentive to detail at a very early stage.

The most important aspect of libft is that it is the first project at the school. Students get to know their peers and will perform peer evaluations from day one. This exposure to other people's code and discussions about code and ideas is what makes the school special. They learn to discuss their code so that others can understand them, forcing them to think about the other' perpective. They learn to formulate their ideas concisely and comprehensibly from the first day. Moreover, they develop the habit to ask their peers for help if they are not able to advance by themselves, which in turn teaches everybody to teach code and make it understandable.

Makefile and GoogleTests

During this project, I've begun to familiarize myself with GoogleTest. It is essential for 42 students to test their code, and since I really like Test Driven Development methodologies, I was eager to get to know and use a testing framework for C/C++. I've already gained a lot of experience in Test Driven Development through courses and books (TestDriven.io, Learn go with tests) and personal projects (From Nand to Tetris in Go). In fact, I think that completing the 42 cursus is a perfect opportunity to become proficient with a testing framework and at testing in general.

Mandatory part

Program name libft.a
Turn in files Makefile, libft.h, ft_*.c
Makefile NAME, all, clean, fclean, re
External Functions write, malloc, free
Description Write your own library: a collection of functions that will be a useful tool for your cursus
Library
stdlib ft_isalpha, ft_isdigit, ft_isalnum, ft_isascii, ft_isprint, ft_toupper,
ft_tolower, ft_itoa, ft_atoi
string ft_strlen, ft_strlcpy, ft_strlcat, ft_strncmp, ft_strnstr
ft_strchr, ft_strrchr, ft_bzero
ft_memset, ft_memchr, ft_memcpy, ft_memcmp, ft_memmove
ft_substr, ft_strjoin, ft_strtrim, ft_strmapi, ft_striteri, ft_split
stdio ft_putchar_fd, ft_putstr_fd, ft_putendl_fd, ft_putnbr_fd
list ft_lstnew, ft_lstadd_front, ft_lstsize, ft_lstlast
ft_lstadd_back, ft_lstdelone, ft_lstclear, ft_lstiter, ft_lstmap

References

TestDriven.io

Learn go with tests

Learn go with tests

From Nand to Tetris in Go

nand-to-tetris-in-go