Freddy Montes

Costa Rica (GMT-6)

Frontend Developer with a graphic design degree. UX/UI and Javascript crafter. More

Using code to solve real life problems

September 9, 2019

This post was originally posted on my Instagram account.

Using code to solve real life problems

REAL LIFE PROBLEMS: My mom owns a little convenience store here in #CostaRica and she need to create labels for the products she sell. The system she use for inventory and invoicing only give you a Excel file with the products information: name, barcode, price, etc… she was like: “Freddy get me some paper sheets so I can write down each label”, like manually, like +500 labels… 🤯 Here was my solution:

1️⃣ Took the Excel file from the system

2️⃣ Clean up all the extra columns, only left: Name, barcode and sales price

3️⃣ Export as CSV file

4️⃣ And write a #JavaScript app

The app is very simple, I vanilla JavaScript to parse the CSV file, create an array of objects with the properties: name, barcode and sale price and with that I just create each #HTML label and add some #CSS so I can print out.

I was super happy to see that what it was going to take my mom hours and hours was achieve in seconds but not only that now she’ll be able to update the labels very easy.

❤️ Follow me for more content in @fmontes.

© 2020, Built with pure 🔥 and Gatsby