Skip to content

This repository is a compilation for all my projects during 42's Piscine at SUTD Singapore, held on March 2024.

Notifications You must be signed in to change notification settings

felixtanhm/42-piscine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

94 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

42 Piscine

This repository serves as a compilation of my experience attending 42's Piscine @ SUTD in March 2024.

42 is a global education initiative that implements a different approach to learning: no teachers, no lectures, students learning from their fellow students (peer to peer learning), with a methodology that develops both computing and life skills. 42 is free for whoever is approved in its selection process.

The Piscine, a 26-day C programming bootcamp, is the last stage in the selection process for becoming a 42 student.

  1. Reflections and Thoughts
  2. Projects
  3. Piscine Tips

1. Reflections and Thoughts

The concept of 42 was something that really resonated with me. As a student, I've never thrived in a traditional school environment. I get bored with lectures and listening always booked me a one way trip to dreamland. I've come to realise I've learnt better by doing.

I'm a firm believer that in the era of the internet, rote memorisation and fixed syllabi has become an outdated method of teaching, and learning. It stems from an era when information was constrained within the confines of books. Today, I believe that understanding and application hold a higher precedence; and allows society to solve for problems of higher complexities.

42's way of learning, presenting you with projects, and largely leaving you to your own devices in solving them, applies this perfectly. Aside from a few starter videos, students are largely left on their own. At my current stage of learning to code, going through the Piscine and learning C has allowed me a deeper understanding of code and how it interfaces with the computer.

I've learnt of bytes and bits, of memory and why there's an inclination towards efficient code. Where I was spoilt by Javascript's abstractions, I've now been forced to write code on a lower level. With 42 forbidding the use of any library functions except for write, having to recreate basic utilities like sort and compare has made me flex programmatic thinking in a way that wasn't required in Javascript.

There were times in the past 26 days where I found myself thinking that maybe, taking on this Piscine was a distraction derailing me from my goal of becoming a Software Engineer. Now, as I write this, I think differently. The past 26 days has been a breath of fresh air. I've been mentally stimulated and challenged in a way tailored to my preferred mode of learning.

This has been a worthwhile learning experience. I've had a ton of fun with amazing individuals, and I feel I will be a better Software Engineer as a result of this Piscine.

2. Projects

Don't copy, learn. :)

Projects Solutions Concepts
Shell00 100% Shell Basics
Shell01 70% Shell Basics
C00 85% Intro to C
C01 100% Pointers
C02 85% Strings & Arrays
C03 100% String Manipulation
C04 100% Integers & Bases
C05 80% Iteration & Recursion
C06 100% Argc & Argv
C07 60% Memory Allocation
C08 100% Headers, Macros & Structs
C09 100% Libraries & MakeFile
C10 N.A. Recreating Programs
C11 100% Function Pointers
C12 N.A. Linked Lists
C13 N.A. Binary Search Trees

My solutions for projects in 42 Piscine. Please open an issue in this repository if you spot any errors.

/*
 * Project files will be documented in the below format:

 * @brief what this code / function is supposed to do
 * @param the parameters which are passed into the function
 * @return the return value that this function will return
 */

Project Highlights

Of the projects done, I'm particularly proud of being able to complete C11's ex05 - to create a barebones calculator program in C. To me, the ability to build a simple program represents the culmination of the 26 days in which I was a part of the program and served as a good wrap up to everything I've learnt about C.

Another highlight was C09's ex00, where the functions I wrote to replicate existing C library functions could be compiled into a library, and exported to be used elsewhere. Knowing that I have a library created with functions written by myself, and which can be used by others, blows my mind.

3. Piscine Tips & Tricks

Most Important Advice

Watch CS50x's lectures till Week5. This will cover everything you need to know in the entire Piscine's C syllabus. Post Piscine, this is the single piece of advice I wish I did before the Piscine. I'm kicking myself for not doing this (only watched till Week2) - so don't make the mistake like me. Watch till WEEK5!

Timeline & Pacing

Week1: Shell00, Shell01, C00, C01

  • Open your evaluation slots immediately! This allows you to meet people, evaluate their code (which helps you get answers too), and allows you to earn points which you will need to submit your own projects.
  • C00 will be available on the 3rd day of the Piscine. Start work on it immediately as Exam00, the first exam, will be on the C language.
  • If you have not finished Shell01 by the 3rd day, skip it and work on it when you have spare time. Focus on C00 and C01.
  • Do Rush 00!! You have to participate in at least one Rush during the Piscine to qualify for the program and the rest of the Rushes are very difficult.

Week2: C02, C03, C04, C06

  • Leave C05 for Week 3. It's better to work on C06 as the concepts in C06(Argc and Argv) are part of Exam01.
  • If you managed to finish C06 comfortably during the 2nd week, you can give Rush01 a try. It's an interesting problem and a potential programming interview problem.
  • Otherwise, it's perfectly fine to skip Rush01 if you've already done Rush00.

Week3: C05, C07, C08, C09

  • If you did not participate in any other Rush, you have to do Rush02.
  • It's fairly possible to finish this week's topics ahead of time, especially if you skipped Rush01. With your spare time, you can move ahead and try C11, or try to get 100% in previous Projects.
  • Skip C10, as it's very difficult.

Week4: C11

  • Focus on C11 and finishing the previous Projects with 100%.
  • When you're done, you can try to do C10. Without finishing C10, C12 and C13 won't be available to you.
  • Remember to allocate time to prepare for the final exam.

Exam Tips

Exam Registration

  • You need to register for the Exam Event BEFORE the exam. Failure to do so will result in a default fail for the exam.
  • During the exam, you have 10 minutes to log in to your examshell. Failure to do so will result in a default fail for the exam.
  • To log in, type exam as the username and password, instead of your normal username and password.
  • Open your Terminal, and type in examshell.
  • Log in with your normal username and password.

Exam Topics

  • Exam00: Functions, Loops, Conditionals, Arrays and Strings
  • Exam01: Argc & Argv and everything from Exam00
  • Exam02: Malloc and everything from Exam01
  • Final Exam: Function Pointers, Linked Lists and everything from previous exams.

Taking the Exam

  • You do not need to norminette your exam solutions.
  • You do not need to have the 42 Header in your solution file.
  • You do need to pay attention to what the exam question is asking for. Remove any unneccesary testing functions and files.
  • Before submission, commit and push your code to the rendu/<test question> directory.
  • To submit, type grademe in the examshell and wait for your results.
  • Upon each submission, there are traces that will be saved to your traces folder. These traces can help you debug what went wrong with your solution.
  • traces might not always be available, depending on the exam.
  • Depending on your machine, VSCode might or might not be installed. Don't rely on it and learn how to use VIM well enough that you can do the exam with it.