Silicon Valley

The past two weeks of NOC has been a whirlwind ride. It stretches from looking for housing to finally settling down. There was a bit of drama here and there, but I am glad that we’re all settled down nicely now.
Having heard so many stories about NOC, I have experienced for myself the struggle that people go through while looking for housing, transportation, insurance and setting up finances. It is further made difficult by the fact that we are working and attending classes at Stanford at the same time.
So far, I’ve settled down in a little nice corner of Sunnyvale (South Bay Area) together with 7 other batch mates.

Keeping an Open Mind

Everyone departed for NOC with this goal in mind. “To go with an open mind.” I think it is important to always question periodically how open am I. Many times I like to retreat into my own enclave and tell myself this is my way of doing things, and I’ll keep to it.
Be flexible, be understanding, be forgiving.
Opened a fortune cookie after lunch at Chef Chu’s today and it read “Be prepared to modify your plan. It’ll be good for you!” It’s probably a sign that I should relax and take a chill pill. Plans do change and when they do, I need to take them in my stride.
Getting a car was an interesting experience. Although in the end I took a huge risk by purchasing a car without first sending it for mechanic check. (Probably should do it this weekend) It was a calculated risk though, considering that it’s relatively new with low mileage, plus it’s a Japanese car. It should last me for at least half a year! It’s called the Platypus. Shall take a picture with it soon.
Oh and yes I forgot to turn off the headlights on the first night I got the car, and had to find a security vehicle in the rain at the parking space to jump start the car. What an adventure.
The advice given to me long ago should still hold:
Engineers cannot panic. Don’t panic.
Work has been pretty smooth, and I am not sure if that is good. I am still learning, but at a much slower pace than I expected. Maybe it’s time to focus more and cut out distractions.
Stanford lessons were really amazing. There’s this whiff of excitement every week that I step into Stanford. There are really bright students in class but I think it is important to calm down to gather your thoughts before speaking. It is tempting to raise my hand at every opportunity to express my views, but a well-thought out answer is always better preferred compared to a winged answer.
It’s going to be nearly a month here, and I look forward to way more adventures ahead! :D

NOC: Prelude

As most of you already know, I departed for NOC a day ago. It still feels pretty surreal that I am here in Silicon Valley, where I dreamed of going ever since I fell in love with programming.

I think it’s important to set the goals and aspirations straight for NOC. It’s a very unique and special program and there are different ways of approaching it. So here’s just one humble goal I wish to achieve.

Level up, more.

I’ve been keeping this goal for every semester in NUS and it’s something that I really value. Keep levelling up. First semester I had CS1101S, which challenged the way I think about programming. Then I went on to fulfil my thirst for software engineering by contributing to NUSMods during my first winter break.

In the following semester, I took on a project of my own, which was compiling an EPUB version of SICP in JavaScript. Although it wasn’t perfect, it still taught me many valuable lessons about web development. Also coupled with an accelerated algorithms course (CS2020) which once again proved to be challenging.

Then in my freshman year’s summer, I felt the need to take on something on a bigger scale, of more importance and challenge. I joined ShopBack and was part of the UI redesign and reimplementation. It was a really fruitful 3 months spent despite the tough times. In the most recent semester, I took up the challenge of CS3216 and I learned and achieved more than I could ever imagine, at the cost of my other grades.

The thirst to level up pushed me through all these tough times. None of the above made my life easy, but I believe it was through the struggles and pains that I am able to improve and better myself. I am glad of where I am today, and I am excited for where I will go in the future.

Looking forward to NOC, it shall be a whole year of level-ing up. Taking on a role of Platform Engineer at EasilyDo, something I am totally not familiar with considering that I came from mostly a frontend background.

Work should not be the only source of learning, spending a year in Silicon Valley, the Mecca of software engineering and innovation, should also open my eyes to more engineering and startup culture.

Be like a sponge, absorb. Learn and imitate what is good, improve what is bad.

Keep quenching this thirst to improve, keep setting higher expectations for myself. This is what the next year’s gonna be about. :)

Y2S1 – A Whirlwind Ride

Results came out earlier today and I wouldn’t say I’m very satisfied with them. The entire semester has been a whirlwind ride, here are some reflections.

Work is manageable, time isn’t.

This has to be the greatest lesson learnt. Modules are actually pretty straightforward and easy to understand if I had put in consistent effort weekly for the entire semester.

Focus on what is important

I would say that most of my time were not spent being productive on the things that matters. In other words, I spend too much time thinking rather than doing. It’s a habit that I should try get rid of as soon as possible. CS3216 did take up most of my time this semester but I have to admit that the remaining time were not well spent. This was pretty evident when I screwed up midterms big time because I did not do my revision according to plan.

Being more proactive

Resources are out there to be utilised. I’ve gotten a bit more lazy this semester in terms of actively seeking out help from tutors and professors on help. I would gladly use CS3216 as a convenient excuse for me to have ‘no time’. But I am quite certain this isn’t the case. It all goes back to the part on time management.

Exercise, don’t neglect it

The exercise counter for this semester is close to zero. Apart from the weekly captain’s ball sessions, I’ve not been doing any exercise of my own. (Not to mention there’s IPPT coming up tomorrow)

Let go of thoughts

Sometimes thoughts are toxic, and they affect the way I function on a daily basis. Many times this semester there was a need to empty and gather back my thoughts. It helps me reconsider what matters and what doesn’t. These thoughts stems from every aspect of my daily life and it’s important to let go and ignore them sometimes.

Overall it wasn’t a pleasant semester, but I’m excited for the next stage of my life in Silicon Valley for a year.

Looking forward! :)

API Rate Limiting

Since WordPress’s new admin site is so awesome <insert emoji with heart eyes>, I think I should document my little learning notes here instead. Shall use a sub-domain for this WordPress in time to come!

Letterbox’s traffic went a bit off today, causing our instance’s CPU usage to spike. Apparently people were spamming API calls to our server, resulting in some form of DoS attack, well but it didn’t exactly crash/overload it.

Do things that don’t scale, right? It probably slipped our mind when designing the API, thinking that all users would be angels and not do weird stuff like that. Clearly we were wrong. Also this would be needed in time to come when the API calls start to exceed Facebook’s API rate limit.[1]

API Rate Limiting is basically restricting the number of times a particular end user is able to call the endpoint. There are a couple of ways to do this, and the way that we chose would be to utilize a Redis cache.

The idea is to have a key-value pair (user ID as the key and times accessed as value) that will update everytime a call is made, and Redis is perfect for handling little tasks like that.

There’re many considerations to take into account for such a simple implementation. A cursory look online points to having to deal with HTTP headers (agh damn networking), different time buckets and also pipelining. It is certainly good to dive more into the details in time to come, but then there’s finals.

So instead of reinventing the wheel, I opted to use express-limiterIt’s already written and works right out of the npm box. [2] The task is done in around 10 lines of code.

var redisClient = require('redis').createClient();
var limiter = require('express-limiter')(app, redisClient);

 path: '/matches',
 method: 'all',
 lookup: ['', 'connection.remoteAddress'],
 total: 50,
 expire: 60000

These few lines of code simply set a 50 call limit to /match endpoint, and sends a 429 if there are anymore calls from the same user IP thereafter. It does not seem like much but I think as a frontend developer since forever, I’ve not been able to appreciate such backend concepts.

A little something I learnt today, besides SQL, DRC/TRC and Relational Algebra. Yup CS2102 is coming up next.

Oh and I realized at the end of writing this post why I wouldn’t document more craft related post here. Typing code into WordPress is still pretty painful. 




[1] Well… a problem for next time.
[2] Loses a lot of flexibility though.


Where the Actual Learning Takes Place

Just came back from lunch in a pretty cool suite and it gave me a little musing/flashback.

As my Economic teacher in Junior College used to tell us when we’re in the middle of a chaotic discussion about any concepts:

Go ahead. Discuss. This is where the actual learning takes place.

It’s been three semesters in NUS and I’ve been studying in solitude for the exams every single time. Perhaps the modules I did the best for were ones that I actively participated in discussions about concepts.

CS1101S only got slightly more interesting towards the end where I actively discussed with Alex about the concepts. CS1231, CS2100 and CS2020 was fun throughout since Ryan and gang were there for me. Those modules which I did the worse for were those that I did alone, like Calculus and General Biology. For this semester, Computer Networking was a total nightmare that will probably come back to bite me in the ass.

I remember writing a blog post way back during army that learning alone is tough. I was struggling with C++. There wasn’t anybody to direct your concerns to, nor have a casual conversation about concepts and ideas. True learning takes place best when there is active discussion.

Maybe this is something I missed out, and I wish I hadn’t. It is difficult to step out of this bubble that you surrounded yourself with.

Also, I feel it’s important to keep myself grounded. Remove myself from the attention that I’ve been getting lately and focus on personal growth and development. I’m not that great.

Afterall, glory isn’t permanent, skills are.

CS3216 Post Mortem

It was a bold decision to take this module in the first semester of my second year, and I certainly do not regret it. Not many people are given this opportunity and I certainly learned much much more from this module than all other modules combined.

That being said, I am probably very screwed for finals. The first paper is ~4 days away and I’m not prepared. At all. (Yet I’m still writing this post because this is how much I appreciate CS3216)



Never be over ambitious.

This was really the primary takeaway from this first assignment. Another would be to manage team dynamics properly. There wasn’t much team structure in this first assignment and I thought part of it was because it was poorly managed.

The product itself was a simple idea, match NUS students together in an anonymous chat. Thinking back now, what was the entire point of this? Does it really help students meet, and what problem does it solve? This idea was clearly not very well refined.

Technically, it gave me a (painful) insight into React.js and the different Flux architectures. But given another opportunity I would have chosen something simpler, or simply do Vanilla React.js to facilitate the learning curve.

Of course, learning fast is one of the main goals of CS3216. But it is important to set some clear boundaries of what are our limits and make appropriate adjustments if things are not working out.

Seminar on Medium

Simple UI doesn’t mean fluid UX.

Assignment 2 allowed me to develop a keen eye for good products and of course critique bad ones. We chose to critique Medium. Initially I thought that we’re outta our minds.

Medium is so well designed and thought out. What is there to critique?

But at the end of the day, I’m glad that we chose a difficult app to critique. It shows us that even good apps have their flaws and weaknessses. The ability to nitpick on the fine points also allows us to do the same for our own products.

It forces yourself to think about what the user thinks. As very technical people, our ‘user experience’ is often clouded by our own knowledge of technology. Users are stupid. It’s tough to place yourself into their position.

This assignment taught us how to be stupid, somewhat. (Lol.)



Niche apps don’t get as much attention.

This was one of the more niche projects that I’ve done. The grades for this project was not up to expectations at all and I think it’s largely due to the fact of it being very niche.

Not many people would appreciate reading server logs from their mobile phones unless they are DevOps Engineers or really technical people. Given this fact, it is difficult to convince people to use such an app.

As always, I worked on the frontend using React.js and it taught me how to appreciate Flux architectures more. Although the focus was on a mobile web app, we built it on Ratchet with a very stock design. On hindsight, more could have been done to include branding. The inital plan was to come up with a functional MVP which serves the purpose of the app instead.

Despite a really poor grade, there were still lessons learnt from this assignment.



This was where the bulk of learning came from. Taking in lessons learnt from the first three assignments, this was a very well refined and validated idea. As the Product Manager, it has also given me the opportunity to negotiate, network with people, and manage a team.

Talking to People

It takes a bit of getting used to talking to strangers about an idea, and asking for feedback. It started with talking to people along AS6, to talking to even more random people at UTown to get photographs.

It allowed me to step out of my little bubble and discover things that I never thought I could do. It also removes the awkwardness that was present in me.


Our product was built on Ionic framework, which made this very easy to iterate and deploy on both iOS and Android. Angular.js abilities have also up-ed by quite a bit and I’m more familiar with SPA concepts.

Next steps would definitely be development on Native platforms, or a better Web platform.


Maketing was part of the grading scheme, but lots of it was done for the product because we take pride in what we do. Facebook page, posters, and partnering up with the right people has led us far and the results were pretty satisfactory.

Winning STePS

Yes, not to mention, we won the Best CS3216 Project for School of Computing’s Student Term Project Showcase. :) It was really tiring since we had to do our sales pitch non-stop. I lost my voice momentarily after STePS was over. It was insane.


Overall we’re very satisfied of how far Letterbox has progressed from just an idea into an actual project. Hopefully we can take this to even greater heights! :)

CS3216 has been the main highlight of this semester. The next year would be a total different ball game in Silicon Valley and NOC. There’s much more to learn and experience. That being said, Letterbox will not die, and will continue to grow into something that we can be really proud of.

Cheers. 🍻

Oh I’m a mess right now, inside out.

It’s only after recess week and my semester just took a turn for the worst. A series of events happened and I really feel bad about the way I took it in my stride.

First of all, midterm results were not satisfactory. I performed slightly below average for both papers. Given that I only had two papers to prepare for, this was a total letdown.

Seriously, I had a week to prepare for two papers and I performed lower than par for both?

Next up would be the preparations for technical interviews. Having done a summer of software engineering, my algorithmic thinking skills have more or less degraded. It’s true that the foundation from CS2020 will get me back up to speed in no time, but I should keep in mind to do some algorithm exercises every once in a while to warm myself up again.

Lastly, I have serious issues with my CS2105 assignments. 50% for the first assignment because I submitted it with the wrong file name, while another 50% gone because I used some boilerplate code online for the second assignment. I got 2 more assignments to go and hopefully it will go better than the first 2.

Why do I write posts like these every once in a while? It probably makes me feel that I am doing some reflection on my life, and to some extent make myself feel better about the situation I’m in right now. Which is exactly what these posts allow me to do, calm down. 

Here are my three re-evaluated priorities for the remaining 4-5 weeks of the semester:

Letterbox – my CS3216 baby

This project is what makes this semester so much more worth it. Having a project that I care about to work on. Not going to reveal too much about it here, but here’s the awesome logo that my teammate designed:


Really excited to ship this by Monday night if possible!

Technical Interviews

There will be a bout of interviews heading my way soon and I need to be prepared for them. That means to revise my algorithms as much as possible, and get familiar explaining them to people. There’s a couple of ways I can do this. 1. Do as much Hackerrank problems as possible, or 2. Go through my CS2020 concepts once more. (I still have my cheatsheet with me)

Or a combination of both if I have the time. I think the latter should be a better option since I need a serious refresher on my basic algorithms & data structures.


I’ve been neglecting this aspect of school a lot this semester. Putting in only minimal efforts for my other modules. Perhaps it’s time to start revising for finals considering that I am lagging behind in the first place. Set up a timetable to see how much time I have left again and proceed on from there.

I once told myself that “having poor results for other modules due to CS3216 is bullshit.” I still think that is the case and I’m not willing to give my results up for this semester. It is possible to have the best for both and the only reason why it is not happening is because I have not been trying hard enough.