Algorithmic approach to problems in Covid times.

Dexter Goh
15 min readJan 11


Picture credit is given to John Spencer —

Hi there! I’m Dexter and what you are about to read is the story of how me and my class overcame adversities in school during the Covid-19 period back in 2020 in Singapore. It wasn’t easy but the process made the experience worthy of a tale to tell.

A system is not a singular effort but a collaborative effort

Table of content

1 — Background context

2 — Problem at hand

3 — Evolution of the system

4 — Challenges faced & Solutions

5 — Measurement of Effectiveness & Value

6 — Learning Curves

This project employs the different Google services for the formation of a system used for placing lunch orders in College Central, ITE Ang Mo Kio — during the period of strict social safety measurements in phase 1, 2020.

NOW, be wary, after repackaging this for other platforms asides from Linkedin, even i have to admit, this is an extensive read. do brace yourself and take breaks while reading this

Background context

The date is the 14th of May, 2021. Exactly over a year ago around this time of the year, since Phase One days, our class and along with the rest of Singapore faced two consecutive lockdowns and progressed towards Phase One. We were to return to classes on an alternating weekly basis. This meant a week in school, and the other at home.

As a class, we were tasked to self-manage our own lunches and order them from the food court. At this point, it should be noted that these were the safe measurements implemented during Phase One, which meant no dining in and lunch is to be consumed in classrooms using takeaways. Each class will send three to four representatives to pick up the takeaways from the canteen once orders have been placed through our phones.

It first started as a desire to manage the entire class and my own lunch orders. However, I was worried about getting my classmates’ orders wrongly. Everyone could understand that I was in a panic. It was a learning opportunity because my classmates would let me try ordering for them. (I can attest that I followed everyone’s order correctly while doing this.)

Four more classmates joined me in undertaking this endeavour of ordering food with swiftness and precision to ensure a happy class and strong morale to study.

We were all confined to the classroom when told to return to school for physical learning and our only interactions were with each other. Extra curriculum activities halted, lunches were consumed in classrooms, interactions with friends from outside our classes were limited and the entire college was in dead silence.

Problem at hand

I was assigned to the DPP class. Seven other classmates, along with myself, were the only ones with a year or more experience on campus and we knew how to navigate around fast and efficiently due to being familiar with the college.

The problems we identified were plenty and starting with:

  1. Usage of manual ordering forms in stacks of paper as there are 38 of us and 5 weeks of school, equating to 25 days in that term. That totalled up to 38 * 25 = 950 sheets of paper. Being in one of the most IT-intensive courses on campus. We decided we could do better.
  2. How to allow multiple user inputs to submit their orders in an efficient manner because we did not want the case of an order form passed around and forgotten somewhere in transition. Hence, we decided on Google forms because of familiarity and user-friendliness.
  3. How do order takers process that information in less than a minute or two to start ordering when we are at the food courts.
  4. How can we organise the data in the spreadsheet to serve our needs?

Evolution of the system

This is a breakdown of how our system progressed in a span of ten weeks.

You’ll soon see how we improved this system after encountering numerous setbacks with the initial development. It is a clean Google form that has not undergone any iteration cycles or received any feedback from actual users.

iterative model article courtesy from a more experienced freecodecamp writer and developer in the community, shout out to you Adam

If you are interested in Fintech, i urge strongly to go check out his other stuff.

We opted for a survey form-typed tool because it solves two key problems

  • Multiple inputs at any given time ( also known as Multi-user )
  • Time efficiency

The idea of having those two problems solved sounded great, however, it lacked structure.

At the time of this making i don’t even understand what structure means and understand and how it applies to software yet, amazing how many gaps of knowledge you find upon second introspection right

We focused on enhancing key areas of the form, such as the user end side that is likely to accept invalid entries. This not only improves the user experience but also saves order takers from the unnecessary effort.

For example,

After a few alterations and latent problems were revealed and identified, I started to craft the foundation of the spreadsheet after noticing how it is no different from a Microsoft spreadsheet and how google forms are just another way of receiving inputs ,delivering intended computation outcomes. I applied inventive formatting to a few cells to help us display an order summary so we could know what to order at each stall while being able to view the menu and the quantity required, i really went the distance in complexity by allowing different variations of food items just so i could learn more from spreadsheet programming ( formulation ) .

The image below illustrates how the algorithm of the backend computes the calculations for quantities per food item from different stalls.

It simply made thinking about getting from point A to point B less complex so I adopted a flowchart to see how it would work out and whether it gave me what I wanted. I cannot deny that it was also an opportunity for me to apply what I have learned in class.

Since then, I’ve been utilizing it for challenging exercises, and if characters and code were making my eyes spin, I always turned to this, no matter how noobish it could have seemed to senior developers with more expertise. Complexity is always untangled by it.

Here is how algorithmic writing would appear. I also adopted this because, at the time, writing a list of instructions on how something would be carried out enables me to find joy in programming. To this day, I still find it enjoyable. This is also courtesy to my trainers in Lewagon, imparting me the art of pseudo-coding *PS still use it till today, useful stuff haha.

Algorithmic steps in plain human writing for calculating food item quantities from different stalls

Let me walk you through of how it looks like under the hood,

  1. We start by arriving at the Google forms page.

2. User selects food via form

There is a reason behind the use of numberings so keep reading to find out!

3. Order is submitted

4. Submitted entry is recorded into G-spreadsheet

At Row 17, is the name we have chosen in Step 2 and it is then verified as food item “2”.

5. If an order from ABC stall is food item 1 (in this case, we are using Italian stall).

At Step 4, we can see two “1” indicated from Row 12 — Row 17.

This computation is done through the usage of the following formula:

  • =SUMIF(J2:J59, “1”)

What I am essentially doing is choosing the column that will be filled with choices for Italian food items in J2:J59, containing the number “1,” and adding them all up to get the total at my specified cell.

6. Italian food item + 1, IF cells J2:J59 contains the number “1”

7. ELSE IF, order is food item “2”

For food items 2 and above, we do things slightly differently with just one extra step needed. Because at that point of implementation, my knowledge and competence of using excel/spreadsheet for programming was scarce (heck I didn’t even know you can do that in the first place!)

I needed a way to tabulate the quantity of food item 2 without compromising its numbering. Hence, coming up with a solution to catch it at multiples of 1s, to do first, I needed to divide them into separate sections before processing them into multiples of one, accurately reflecting the correct quantity per food item.

8. Food item 2 increments 2 on dashboard B

using the formula,

=SUMIF(J2:J59, “2”)

9. Food item 2 on dashboard B, divided by 2 on dashboard A


  • If we take the integer 4 on Chicken Aglio pasta at Step 8
  • 4/2 = 2. The logic checks out, and this is replicable to 3..4..5 and so on.

10: End.

As in, end of algorithm, in my future articles attached as easter eggs within this article, you will soon come to appreciate the how elegantly straightforward your brain will be capable of comprehending such an extensive functionality because every algorithm will always have step one and & end step

Those were the nine steps! or ten ( no crossing out on medium for now haha )

At a glance, in less than 10 seconds. we know we have orders to take,

  • 2 pax of Chicken Chop pasta
  • 2 pax of Chicken Aglio pasta
  • 2 pax of Creamy Chicken pasta

Challenges faced & Solutions

Nothing is perfect and everything can always be done a step better. I start with that after exploring 2 sets of Benjamin Franklin’s Analysis: Pros & Cons.


my NLP trainer shares story of lee kuan yew, and this comparison framework was responsible for what singapore had the potential to become since the days of federal separation

i love asking him to retell stories like these, never gets boring for me.

I can clearly see that each option has a unique set of issues that must be resolved and overcome, so it really depends on the circumstances as to which is the better option. I pushed for the digital approach because it offered a chance for novelty, like a new gadget to play with. I must confess that choosing a digital strategy for the end-users ease and safety was a wise choice. However, it is not as practical for the backend work, because i haven’t yet developed the coding chops to do this properly.

The transition to digital actually brought about more issues, and it took more work to get the system running smoothly. Here are six challenges we encountered and the solutions we came up with.

Challenge 1:

If option 1 is at food court A and the backup order is in food court B, even with the backup order option, things could go very wrong.

Solution: we just removed this option for a backup order because this happened very rarely and calling the classmate to amend the order took under 5 minutes and the unspeakable happened on the first day, resulting in a total of 40 minutes to get the last order into class. we ( or rather i was really strong willed in seeing successful metrics such as, lesser lead time )

Challenge 2:

Allowing text inputs in name fields offered opportunities for invalid records to be submitted.
really as forthcoming as seeking out the possibility for the system to be trolled, there’s another article i wrote when it comes to user testing phase which i hope you can download more insights into your life from my journey

Solution: We changed it to a dropdown selection, which, while not completely eliminating the possibility of mistakes here, considerably reduces the margin for error so that we have a way of verifying that everyone picked in accordance with their names when ordering.

Challenge 3:

Since it included money, this challenge was proof of payment. During the first week, there were times when we were short of cash and felt ashamed when we realized we couldn’t pay back what was owed to our classmates. It gave the impression that we were incapable of handling something major that had been entrusted to us.

Solution: We implemented a validation column on the backend and a reminder at the end of the form to request our classmates to come forth with their payment. This only occurs once we receive payment for their meals and have checked off their names in the spreadsheet to confirm their orders, failing which their orders will be cancelled.

Challenge 4:

Using formulas to calculate the quantity ordered for each food item.

Solution: We changed the order options from text to numbers. This allows calculations to take place in the backend of things. Months after this project concluded, I learnt in another curriculum for machine learning and AI with python. This technique is known as one-hot-encoding. (More of this in upcoming articles so stay tuned!)

Challenge 5:

Calculating change needed under 10 minutes mark

Solution: We used the same method for 2 columns as we did for other spreadsheet formula-solved sections. The amount is given, exact change, with exact change calculating the amount by using a formula from the item prices in the order’s third column.

Challenge 6:

Confusion when creating the google form.

Solution: Site-mapping, while we were quick to act but not much attentive thought was given due to the excitement of digitizing a solution which took us at least SIX versions of the google form to get it to be acceptable. It taught us that sometimes the solutions to the most complex issues are right in front of us.

( * ps thank you mr john, LOL, if this article were to ever reach you one day )

I considered 3 areas of effectiveness and the value it has added to the lives of my classmates,

  1. Serving a 1:38 ratio, also known as Multi User

With a google form, instead of handing back and forth physical form one person at a time. A digital form allows exponential submissions at any given time. It not only provides convenience in terms of serving multiple people at a time but the flexibility to amend their orders by resubmission as many times as they like.

2. Faster calculations with pre-instructed formulas

I don’t need to keep track of how many nasi biryani I need to order at the chicken rice stand before or after since intelligent algorithms in place will take care of that. I only need to take a quick look at the cell that has been pre-programmed to accept the complete number of passengers I need to order without the possibility of human error.

3. Reducing carbon footprints

We were just in one class at that time. If the entire college switched to a digital strategy, we could reduce the use of paper and improve our infrastructure while also lowering our carbon footprint. Opportunities to use data science and analytics create new possibilities and avenues to further improve their business operations. It not only benefits the environment but also provides daily data traffic to our vendors for analysis.

Learning Curves

This class project set the foundations of a systemic understanding of software because how it allowed me to practice designing algorithms and crafting flowcharts to map out how logic flows in structures.

End to end analysis

  • Frontend — user inputs/ interactions
  • Backend — computation, storage

In our case, not every IT solution has to be code extensive. We used google forms to receive user inputs. Google spreadsheet as our database & server-side scripting for computation which all worked magically.

At the timing of this writing, two-three years has already passed and version 2 has been made already during another lockdown in Phase 2 (HA). That version was made with Microsoft to appease the security integrity from ITE, being a government institution.

I got another project running over there too, hoping to start new things, and yeah haha it. seems I don’t rest lol. Project Hawkerthon

Don’t be mistaken, in publishing this and writing on medium, this is me resting.

How software solves real-world problems:

Nothing like this mini project of handling food ordering during Phase One provided me with the means to really understand how to use concepts in programming to solve problems.

Throughout the whole process, at every step of the way I wanted to do something to help and achieve a single objective at the beginning of each step, I had no idea how it will turn out, but I knew how it must function, that is to visualize an expected outcome. From this, I knew that solving a string of mini problems is the connection to get towards solving the bigger problem in the picture.

Opening the box of worms known as: Identifying latency errors when system is used more frequently

special thanks to Valarie, my very very first programming teacher, and formidable woman in our times, if this also ever reached to her too

PS: sorry not sorry for the abundance in so many easter egg drops here HAHA, when im writing such experience, many people and things who made an impact just came to my mind, i want to write them as the building blocks of my journey

Even if it wasn’t yet clear to us, looking back now, resolving a few minor issues early on or even in the middle of the process wasn’t the end of it.

It was a never-ending loop of resolving fresh issues that kept sprouting up like troublesome weeds in the garden. It wasn’t that our design was full of flaws that could not be seen, but rather that it was full of flaws that could only be seen in the eye of certain situations.

It taught us a great lesson in application development as you can only anticipate so much in theory.

  • However, anticipate more with experiences earned
  • You can never achieve a flawless, perfect state
  • Our section head wasn’t kidding, software is a continuous upstream if you can’t take the stress of continuous improvement. you are in the wrong line of work.

Personally, I have no complaints because I love it and this is what I signed up for this couldn’t have been possible without the contributions of a group effort, END to END.

Since ITE has been schooling me for four years that EVERY project must come be built with a purpose, an intention, set that well so that i know the direction it must take towards its completion and the value it serves to the end-user, well I thought that was alright

and that philisophy has been ingrained into my mind, so that’s how i’m starting to effortlessly function too. sometimes i hate it. my friends sometimes ( OR ALL IF THEY ARE BEING POLITE) find it irritating.

definitely interesting to park in articles so you know what you are reading and what i’m attempting to put across to you, here’s the message

Message: Being a software developer is not confined to just programming, or knowledgable in how to use the terminal it’s about problem solving and understanding the functionality of available services to put together a solution to solve a problem.

I like to thank the Class, CC2004P(V) for adopting this system of ordering food during Phase One, allowing me the freedom and creativity and come on lets be honest, no need to wear dull niceties, allowing my craziness in me to experiment, and give special thanks to the following classmates that made this possible together,