-
The dining philosophers problem
The dining philosophers is a classic synchronization and concurrency problem in computer science, formulated by Dijkstra in 1965. The problem is as follows: This was a project completed in 42 school to learn about multithreading and mutexes. The goal is to implement and run a simulation in which philosophers can eat, sleep and think without…
-
Variadic functions in C
What are variadic functions? Variadic functions are functions that take in a variable number of arguments. In C, variadic functions take a fixed argument and are denoted with an ellipsis (…) as the last parameter. Here’s the syntax for the function declaration: In order to access the passed arguments, we can use macros defined in…
-
Libft: Writing my first C library
The first project in 42 school was to create our own library, libft. We learnt the inner workings of standard C functions by coding over 40 functions from scratch. In this post, I’ll share what I’ve learnt and my approach for the project. What are libraries? When learning to code, one of your first programs…
-
Quitting my job to learn to code full time
Two months ago, I left my Technical Support job to study computer science and coding full time. Since then, I’ve joined the piscine at 42 Singapore, a 26 days intensive bootcamp as part of the admission process, gotten accepted into the school and started the core curriculum. I’m writing this blog to document my journey…