42 School Cheat Sheet by agavrel
🌐 Language / 언어: English (this document) · 한국어 (Korean)
:two_hearts: Intended for 42 alumni, current students and candidates
Truth can only be found in one place: the code – Robert C. Martin, Clean Code: A Handbook of Agile Software Craftsmanship
A comprehensive guide to 50 years of evolution of strict C programming, a tribute to Dennis Ritchie's language
Table of Content
NB: Use CTRL + F or Command + F to quickly look for keywords.
About 42 School
0x00 ~ What is 42 School
42 is more than just a disruptive educational model and coding school. What makes us unique and a major player in the tech world are the defining characteristics of the 42 culture. Every element of 42 shows our culture, from the students, to the curriculum structure and content, to the $0 tuition and innovative admissions process.
That's right, the school is FREE, originally funded and founded in Paris by generous philanthropist billionaire Xaviel Niel.
I'm not unusual; it's the others who are strange ― Xavier Niel
The name of the school, "42", is a tribute to The Hitchhiker's Guide to the Galaxy, a comedy science fiction series created by Douglas Adams.
42, or The Answer to the Ultimate Question of Life, The Universe, and Everything
The supercomputer had this function ready:
#include <stdio.h>
#define true 1
#define false 0
int what_is_forty_two(void) {
int n = true << 1 | false; // n = 0b10;
while (__builtin_popcount(n) != 3) // stop when reaching 3 bits set
n |= n << 2; // n adds two empty bits with << 2 (x4) and add itself with |
return (++n == '*') ? n : !!n * (n - 1); // you may simply return n;
}
int main(void) {
char *question = "What is the answer to Life, the Universe and Everything?\n";
printf("%sDeep Thought: %d\n", question, what_is_forty_two()); // %s print a string, and %d an integer
return 0;
}
There are no teachers but a pedagogic team that ensure that students do not harm the material and provide a cursus syllabus to follow. What is learned is hence mainly achieved through peer-to-peer project review and RTFM.

Most of the entrance exam and early cursus is done in C language.
Nevertheless, C retains the basic philosophy that programmers know what they are doing; it only requires that they state their intentions explicitly. ― Brian W. Kernighan, The C Programming Language
C is the most pedagogic programming language you can learn as it allows to understand the basis of programming from simple concepts like conditions {if, elseif, else}, loops {while, do while, for}, write system calls and pointers to more advanced one like function pointers and memory allocation.
Later on you can specialize in other languages: Python will fit data scientists and devops, javascript for frontend developers and C# for those looking for a career in finance.
When you say 'I wrote a program that crashed Windows,' people just stare at you blankly and say 'Hey, I got those with the system, for free.' ― Linus Torvalds
You will learn how to do what Muggles were only able to do accidentally.
0x01 ~ For Candidates: About the "Piscine"
If you're going through hell, keep going. ― Winston Churchill
The piscine is the entrance exam that consists of 4 weeks fully dedicated to coding, solving exercises and submitting solo and group projects to peer review.
It does not matter if you fail a project, an exam or a day as long as you keep striving. Someone who has never been interested before in Computer Science would never be able to complete everything in time, yet he will not prevent from being successful.
:coffee: My guess on the success criteria
-
0x00 Come as you are ... or forget this bullshit and prepare a little bit with subjects on github, courtesy of my friend binary hacker.
-
0x01 Prepare to nail the exams on the 4 exams session, knowing that the 3 firsts exams are limited in term of how far you can go and it is not a big deal to miss the first 3 exams as the most important is IMHO the maximum level you can reach. Succeeding the first 4 exercises (36 pts) should be enough to make sure you quality.
-
0x02 Get an acceptable percentage of review from peers (probably 80% is enough, but you would get 90 to 97% if you are nice). Don't be too nice, but don't be a dick with vim .swp files and .DS_Store.
.DS_Store – The name of a file in the Apple OS X operating system for storing custom attributes of a folder such as the position of icons or the choice of a background image. These files are created when you manipulate your files with the Finder GUI.
- **0x03 The logging time has no or v