Now
Now – 20 Aug 23
Life Updates / Worked On

From 24 July until 18 August (yes, including National Day!), I was involved in the July Piscine for 42 Singapore at SUTD. It culminated in a 8 hour (yes! EIGHT HOURS!) final examination: I left after 7 hours, as my whole body was in pain and my brain was in a complete fog. I was literally stumbling from exhaustion as I walked out of the exam hall.
The Piscine has been a very intense but rewarding experience: non-stop for 26 days, for about 8 hours a day. In the four weeks, there came to be a certain rhythm:
- Mondays to Thursdays were largely spent on individual progress. We each have a dashboard, where we are given a point score, based on our progress on specific modules. We gain points with the successful “validation” of each module.
- After you have pushed your code and “finish” the project, you are subjected to two peer evaluations, where you have to defend your code to two randomly assigned peer evaluators. (see below for some examples).
- You also have to give feedback on the evaluators, based on set criteria.
- After your feedback is submitted, your code gets run through an automated evaluation programme called “Moulinette”. It then gets a score, and you get an automated email of the trace of the errors and diffs between your code vs. Moulinette’s test code.
- Friday evenings, we have exams from 6-10pm. I did surprisingly well for the first one, given the circumstances of my first week. For the 2nd and 3rd exams, I bombed, due to misunderstanding the wording of the questions… I am also generally not a night person, and while it sounds like excuses, I genuinely think my scores suffered due to the exam being in the evenings.
- Saturday and Sunday is when we are able to participate in “rush” projects: these are randomly assigned group projects. I participated in the first two rush projects, but dropped out of the last rush and BSQ (a pair project), as I was trying to make progress on my individual modules.
The Piscine reminds me of my CIID days, except that there is a fair bit of independent work, interspersed with peer evaluations and collaboration. Like CIID, there is a lot of focus on peer learning: you learn SO much from your peers!
One of my fondest memories of peer learning was getting evaluated by a classmate, Chris, as we talked through our code to calculate square roots. I had evaluated him earlier that day, and had spotted what was likely to be an issue: he had used the formula of (sqrt * sqrt >= nb), while I had used (sqrt >= nb / sqrt), as that seemed to avoid a timeout when calculating large numbers. I’d previously used his formula, and gotten a timeout from “Moulinette”, 42’s automated grading program. Unfortunately, he had gotten a timeout too!
He pulled out a snippet to calculate the time, and we proceeded to test my code with his snippet. To my huge surprise, his formula was actually TWICE as fast at calculating 46340^2! We then examined the details, and it turns out that his formula IS actually faster, but because the next square root after 46340^2 is larger than the maximum integer allowed in C, his formula led to a stack overflow, leading to the timeout. My formula cut out the chance of a stack overflow, because nb/sqrt is performed first, and that is well within the range of integers in C.
If the above sounds like “abracadabra” to you, that’s ok: just know I had a lot of geek fun. 😉
There were many such moments of peer-led “a ha!”s. Like when my friend Tinaesh looked at my code, and pointed out that my pointer was not pointing to the start of the string but was pointing at the end of the string (-face palm-). Or when another classmate showed me her super-elegant recursive code in finding the next prime number, which literally consisted of 3 lines of C code (not including a helper function which checked for primes). Or when another classmate explained to me that the declaration of int *ptr is NOT the same as *ptr, which in turn is NOT ptr but is dereferencing ptr (i.e. calling the value that pointer ptr is pointing at), and it actually made sense to me. Or when Tinaesh did his “some pointers on pointers”, which was very enlightening!
The Piscine didn’t start very auspiciously, though: on 24 July, around 7pm, I was at home and my cat as crying for food. Suddenly I had a feeling of disorientation, and my left-side hearing disappeared by more than half. It was very bizarre, and the first time I had ever experienced anything like this: it felt like someone was playing with the volume control in my head, and also played a very loud ringing sound (tinnitus). I went to bed with this feeling of extreme disorientation, and my wife (to my surprise) was very concerned: usually she thinks I’m over reacting to things. So I agreed to schedule to see a doctor asap.
The next day, I cycled to school, and cycled back: all the while, the hearing was very muffled. I had to conspicuously ask people to repeat what they said to my left ear, while turning my body around to hear using my right ear. This was particularly prominent during my father’s 75th birthday dinner that night, with my parents, wife, my sister and her family. But after the cycling, the hearing did appear to improve a little.
On Wednesday 26 July, I managed to get an appointment at the Bukit Merah polyclinic using the Health Buddy app: it was literally the ONLY polyclinic I could get an appointment earlier than November… after I told the doctor my situation, she looked at me and said “Why are you here? You should be in the Emergency department!” That was unexpected. She wrote me a referral letter to the hospital, and kept telling me “remember, you MUST go today ok?” I went home for an early dinner, then headed to CGH A&E for the appointment. In the end, I only managed to leave hospital around 9pm, which was quite early as they told me to expect a 4-5 hour waiting time.
On Thursday 27 July morning, I was given an emergency appointment with the ENT specialist at CGH at 930am. So that morning was spent on tests, and then talking to a doctor who didn’t seem too concerned since my hearing was getting better: apparently, aside from the tinnitus, my hearing was largely the same as the other side! So he prescribed a bunch of Vit B complex and scheduled a follow-up appointment in two weeks.
So in the first four days of the Piscine, I literally spent 1.5 days seeing doctors, while my classmates were chugging along learning about C pointers (which I got stuck on). Eventually, I caught up, but it was a bit of a slog in the second week.
The final exam went surprisingly smoothly. I was surprised that I was able to progress as quickly as I did. Eventually, when I left after 7 hours, I had successfully completed 10 questions for 60 points; for context, I only managed to complete 3 questions in the first exam, which was my next best score!
But it is a really steep cost: the whole of yesterday felt like a mental fog for me, and it was only this afternoon, after two naps, doing housework, and two meditation sits, that I can claim to be back to somewhat-normal. I am going to take another nap after posting this, lol.
Heard
Recently, I came across this talk that my teacher Ajahn Brahm gave to the monks at Bodhinyana Monastery during the Rains Retreat in 2003. It is a very inspiring talk, about what is our real refuge.
This section was very pertinent for me:
People take refuge in negativity. You feel strong, you feel passion, you’ve got a cause. powerful and strong. taking refuge in negativity… is like a terrible drug, which gives you a lot of sickness. it kills you: send you to the lower realms of existence.
You can listen to it here: https://overcast.fm/+FTUdt9g_Y/20:33
Thoughts
In light of the recent matters coming to light, I was thinking about Presidential powers and anti-corruption in Singapore. If “(corruption) investigations may be carried on with the President’s concurrence, even if the Prime Minister does not consent to it“, then why doesn’t the CPIB report directly to the President, instead of to the Prime Minister? It seems to me that the Head of State (who is already tasked “as a custodian of the public service’s impartiality”) might be better suited to check for corruption, as there is less risk of “capture” than in the executive. And if there is any misuse of Singapore’s reserves in the future, it is much more likely due to corruption, as the biggest bank heist in history has shown. So why not give more teeth to the President to do his/her job?
I am disturbed whenever I see foreign workers being transported in the back of trucks and lorries. I understand there are costs. But here’s an idea: instead of forcing all small companies to only transport workers on buses, why not do what the SAF does: introduce seat belts for personnel in the back of trucks? Yes, there is a cost, but this is a one-time cost that could perhaps be subsidized, vs forcing small businesses to incur a recurring cost of using buses.
Read
Basically, what I have mostly read is this book on C in the past month.
Listened/Watched
The Days. This was a sad and quite depressing show about nuclear power gone wrong. The cinematography has a lot of gratuitous overindulgent shots… but the slow pace helped me prepare to go to sleep at night, after a whole day of coding. But it was also quite eye opening how much heroism went into preventing Fukushima turning into an even bigger disaster: much kudos to the Japanese workers on site!
Workout
I’ve not really worked out in the past 26 days. A few times a week, I will cycle to school: it’s about 7km one way. Also did the occasional pullup.
Updated as of 20 Aug 23