Post

Salt Calculator project

Salt Calculator project

Next JavaScript project - calories and salt calculator

Here we go!

This one is a special request. For my beloved wife. Usual calculators can count calories etc, but lack salt inside products. So I made a separate one, including salt. The benefit of it is having database of the products you actually use - from the local grocery store. Biedronka forever :)

TRY IT HERE



It is not yet complete, but already working well. I have plans on optimising the code, especially css.

There are so many lessons I learned during this build! I will share few for now:

  • technical specification is a must-have! Luck me, I did not have to re-do half of the code, but it appeared the requirements and expectations were way more than I coded inititally
  • incoming data format should be agreed beforehand. Categories were not discussed and became problematic when filling the tool with real data.
  • put all your thoughts on paper before starting to write the code. You can spot dependencies and write them all down before getting lost in numerous variables and arrays.
  • html and css are the easiest part :) and take much less time than expected. Probably only for me
  • fixing bugs takes 80% of the time! When you think the project is ready it is actually 20% ready :(
  • numbers format and validation is critical!
This post is licensed under CC BY 4.0 by the author.