Zolada online bookstore

An online bookstore website done with project mate Evan; includes Braintree online payment system, Facebook login via Oauth, carrierwave & AWS image storage. Try out the site here.

Users can sign up using their Facebook accounts to buy books. (But please note, we haven’t submitted it for review with Facebook, so you can’t actually sign in using your FB account unless you’re the site’s developer like us, so you’ll have to sign in using your email.) When the customer buys a book, the stock quantity will decrease. And when the customer successfully pays for the book, he/she will receive an email notification.


If you are an admin, you could also sign in to upload books, a book image, descriptions, and stock quantity. Admins can also view orders and change order statuses, for example,  ‘shipped’ status.

The layout (navbar) is similar to twitter 2.0, because we used bootstrap and this navbar again. This site could be improved with a better grid layout, and functions like a book title and author search.

Twitter 2.0


A twitter clone website done during Alpha Camp coding bootcamp with my project mate, Ash. Visit it here

Signed-in users can follow other users and see their feeds populated by those they follow. Has a search function to search user names and posts.

Just a simple site, could do with more code refactoring so that there’s less requests on the database, and better rspec tests coverage. Images are also missing because I didn’t use AWS to host the user-uploaded images, the images are on Heroku and Heroku stops and reruns its dynos from time to time, so the images are gone now.

You have to register for an account, sign-in, and follow other users to see their posts.

This website mainly demonstrates our knowledge of ORM (object-relational-mapping), and model associations/relationships.


Reflections #Rails, Quality Code

Today we learnt about what constitutes Quality Code:

  • understandable
  • readable
  • tested
  • working
  • clear
  • changeable
  • discoverability
  • documented

We also learnt about rails model associations, how a join table helps join two tables/models’ data for a many-to-many relationship. In teams of two, we drew a diagram called an entity relationship diagram and also used Trello (an online kan ban board) to plot our user stories/app features. We will be working on a twitter app for the next 2-3 weeks.

One of our assignments was to do a kata at Code Wars – Sum with Highest and Lowest .

I tried it and although i passed the tests, i couldn’t pass the null/empty? test. I was annoyed because I just couldn’t figure out what was wrong when i clearly wrote it correctly (if .null? or .empty?) but then in a fit of what-the-heck, I took out the .empty? method, and rerun the tests again, and this time, the code passed. I guessed the question was worded wrongly, It should just be null, not empty, since null != empty.

So lesson here – just write enough to pass the test. And sometimes the questions are wrong. And i nearly gave up actually, I thought there’s no way to pass even if you got the code correct, but then yeah, I guess I got to keep trying.


This week, we learnt to do a forum. We were split into teams of two to work on a forum together, using the kanban method. I think it’s a better method than scrum because it communicates clearly what’s in progress, what’s done, and what needs to be done. I don’t really like scrum because the daily meetings and sprints remind me of my time in an advertising firm and at the tv company. 

At the ad firm, we had daily meetings to talk abt the work, but it didn’t help if the problem wasn’t a lack of communication. The problem was poor sales. And the tv company, the problem was the workload/project was too much for an inexperienced team to handle and the main decision maker or client wasn’t regularly involved in the work progress. These led to tight crunches/many late nights as immovable deadlines loom and staff turnover was high. 

Anyway, we also learnt paired programming – how you work as a pair over a single computer, the driver verbalising his intentions and what he’s doing as he types his code and the observer checks and serves to improve the code through questions and suggestions. 

I want to improve my communication and my understanding of the rails and ruby code and architecture/system. 

Reflections: Model View Controller, Chatbots

Hi, it’s another week (week 3) down at Alpha Camp. This week, we learnt how to do an online photo album using Ruby on Rails, where the user can upload photos to the model(database).

I find this module a bit tough to understand because it introduces quite a bit of technical terms, you may call it jargon; it’s quite abstract and there’s a heap of folders and files generated. But I’m slowly going through it to understand what each component does.

I think what’s interesting is how Rails came to be. One guy who had lots of experience in designing/creating websites and databases saw how messy and repetitive it was, decided to come up with a framework (or library), and a way of defining the structure so that it’s not only faster to develop and get a website running, there’s also a common base for different developers to build on. So whenever you open up a rails site, even if it’s built by someone else, the folders still have familiar names which store familiar components, and you know which is which.

On another note, I’ve been thinking about what to do for our project. One idea I’m interested in is a chatbot. Sort of like Bus Uncle. When it first came out, I was quite blown away. Even though some of the responses were repeated, and even though the app wasn’t particularly quick in giving you the information you want (what bus coming at what time) and other apps can give you more than one bus’s info, I still used Bus Uncle more as it felt like I was engaging with a person. Even though I clearly know it’s a robot. But you know how people even talk to soft toys sometimes, we have a way of personifying objects. There’s an illusion or suspension of disbelief.

I think it’s amazing how far AI has developed in the recent one or two years. It’s almost by leaps and bounds. There’s AlphaGO playing GO against instances of itself and leveling up (sort of like Naruto who cloned himself so that he could get 2X or 100X results from training within a short time) and there’s computers playing atari games and learning from a blank slate through trial and error how to beat the game. Machine learning? I read that there’s also computers reading thousands of scripts so that they can come up with more interesting dialogue. That’s awesome. Although I do fear if computers are able to take over scriptwriting jobs one day.

Anyway, I think people have such busy lifestyles nowadays, and especially for older folks who have work/family and seldom meet up with their friends, there’s a gap for a listening ear in their lives. I know there’s facebook and instagram and whatsapp, but sometimes there’s certain things you’re unable to tell your friends or family. So perhaps if there’s someone you can talk to at your convenience (you don’t have to make an appointment like with a friend), it doesn’t matter if it’s a robot, as long as it can tell you a joke or make you smile – at your lowest point, that would be a most welcome relief anyway.

So maybe, if you have a chatbot that can ask you about your day and make you smile, and show that it cares about you (as it remembers your previous responses and references them), then when you give your answers and reflect on your day, you’re able to think things through and come out feeling more positive or lighter, that would be nice. It’s not a huge improvement, but it oils your day-to-day life.

Ruby on rails MVC

Yesterday we learnt about the model view controller architecture of ruby on rails, how you can use scaffolding or the manual method to set up models (databases), controllers (which processes user input and controls what the user sees) and the view (output on browser). 

That’s my understanding, correct me if I’m wrong. 

So we learnt more in depth about some model commands, how u can send a request to the database and get like how many women and men play sports, from your database. There’s still more to learn like how to switch databases, etc. 

I’m curious what other things can we do with a rails server besides getting database info. Can we send spam, etc? Will Google it. 

Reflections week 2 

Last week, we learnt about bootstrap and flexbox for manipulating html and css. We were supposed to display our work on the projector but my mac couldn’t connect, and I borrowed a classmate’s laptop. It was then that I discovered that my Web page made with bootstrap looks different in his browser. So I guess that’s a lesson learnt, to test yr page in different browsers. Not just chrome. 

What else did I learnt… Ah i almost burnt myself out on the public holiday and the day after. Because I wanted to finish the javascript jquery assignment. I learnt that the clone method needs boolean arguments in order to clone deep data. 

And the day after that during class, when I tried to sort the user rows by coding jquery, I think i spent upwards of 4 hours on it. Not efficient. I think i need to rethink my working and learning style. Perhaps try to get solutions step by step, testing and trying a basic code that’s proven to work before trying to jazz it up. 

And also, don’t reinvent the wheel. If there’s a solution, use it. Don’t be too stubborn and try to code yr own way in. I mean, it’s admirable to try, but also be wise to know when to detour. So that I can cover more ground on other subjects. 

What else? I tried working on the when’s the best time to buy/sell stocks exercise, and I learnt that Ruby and other programming languages have a floating point error when u do even simple math like 0.1 + 0.2. Then u need to round it or find a method online to solve this. For ruby, it’s something like the BigDecimal method.