Coding assignments depress me

I love coding. But not the one in assignment.

In my degree first year first semester, I was studying Programming Fundamentals. The subject teaches you how to use C++, and at the end, you will be asked to submit a final assignment. For my cohort, we are tasked to make the Ultimate Tic Tac Toe.

I have obsession with codes that are clean, readable, maintainable. I want classes to inherit from one another correctly. I try not to repeat myself (DRY principle). And I try my best to deliver the best user experience in the apps I make.

The assignment makes up 20% in the assessment. And apparently, if you manage to implement extra features like LAN, or a simple timer, or artificial intelligence opponent, you get extra marks. But the total marks from this assignment will never exceed 20%.

I spent days and nights perfecting my game. And I dare say, my submission not only has multiplayer capability over LAN, but it has the best overall user experience, as well as UI aesthetic, among my peers.

A lot of my peers got a full 20%, so did I.

They submitted codes that are messy, unreadable, and the game has terrible UI, but they met the criteria, so they got 20%.

Not to say they do not deserve 20%, but it made me realise one thing – the school does not care about great works.

No extra credits will be given to the extra miles you took. Your work is still being judged on the marking criteria. They did this to give chance for people to score 4.00, but this is discouraging people from doing great works.

When I work as web developer, I get to write clean codes that other teammates can easily understand and modify, and I get credits for it.

I don’t get any credits doing the same in university coursework.

This is why I really really prefer working over “studying”.

Why Hackerspace MMU Hackathon Is The Best

So yea, I spent a weekend with 7 other hackers in our faculty’s meeting room, working on the next big thing in Malaysia.

Update: That big thing didn’t happen. Open sourced on

Last weekend in the meeting room of Faculty of Computing and Informatics, 8 of us gathered together and built stuffs, fixed bugs, and presented our fruit. We are members of Hackerspace MMU and this is our tiny hackathon.

Compared to other corporate sponsored hackathons outside there, our hackathon does not give out prizes for the best hack (or best pitching of bullshit). We pay for our own pizzas, we go home to sleep, we do whatever we want.

From someone learning Android and OpenCV to Raymond contributing to Hotot, our hackathon projects are not the typical one-off mobile apps or prototypes for pitching. We do stuffs that we truly love, and things that we can learn a thing or two from.

For me, I managed to tackled a few problems that I encounter when I build the food delivery website. 1st problem is a rather simpler one, adding a custom ordering feature to the POS of platform, which involves ActiveRecord Polymorphic and stuffs.

The 2nd problem I tackled is promotion framework. The promotion framework does a few things, it handles promotions that get applied both passively and actively onto an order chit based on different conditions.

For example, the 1st type of promotion I implemented is student delivery fee waiver. If the customer is a student (eligibility check), and the order chit has at least 1 item that incurs delivery charge (actionability check), the adjustment is applied. For this I took cues from Spree’s Promotion Guide.

Since there will be many types of promotions implemented in the future, I need a somewhat scalable solution for it.

So I created a Promo::Chain class, where you pass in the order chit instance to the constructor. The chain will then pass the order chit through different promotion handling classes in the sequence I defined inside.

For example, in the future we would have a 10% off promotion. Should the 10% discount run before or after the delivery fee waiver? Or it will not run if a promotion with higher priority is being applied? These are good problems to solve in the future, and let’s prepare our codebase for that.

This took me almost 9 hours to experiment with and get the design right (not right enough just yet). If it wasn’t the peer pressure from a roomful of hackers, I probably would not have been able to finish it.

The next Hackerspace MMU Hackathon will be next trimester. And I am totally looking forward to it again. Maybe by that time the food delivery platform would have been up already.

How To Integrate Heroku Status Alerts Into Slack

In Talenox, we rely on Heroku to host our apps, and we use Slack to communicate.

It’s essential to keep everyone in the know when anything happens, especially anything to do with our hosting platform.

Luckily, Slack supports RSS Feeds, and Heroku status has RSS as well.

To subscribe to the status alert inside Slack, go into your channel of choice, and type this:

/feed subscribe

That’s it! Also, it doesn’t cost you any integration quota, if you are still using the free tier!