New ask Hacker News story: How much you could learn from just building a calculator in JavaScript
How much you could learn from just building a calculator in JavaScript
2 by bilalcg | 0 comments on Hacker News.
After researching for quite a while on tutorials teaching how to build a basic calculator in JavaScript, I've come to the conclusion that almost no one is doing this in the right way. The reader doesn't get to learn about designing/wireframing the calculator; good programming practices; the thinking process of solving problems in the calculator; the inevitable process of refactoring; and whatnot. There is so much potential for a newbie in building just this single project that I can't tell you! Honestly, it's for real!! You could start off really really simple and then slowly and gradually, but eventually, turn the calculator into a highly complex, scientific beast. And that is a difficult feat to achieve in the process of which, you'll learn countless of invaluable skills. To list a few concepts: you get to exercise your skills in designing, the HTML DOM API, events, accessibility, timers (for getting stuff added to the task queue to be executed on the next run), procedural programming (yes that's right; every other app doesn't have to be object-oriented), error-handling (using `try...catch`), string processing, and so on and so forth. Time and time again, calculator building tutorials that I've seen have been mostly large 'dumps' of code, some even resorting back to
2 by bilalcg | 0 comments on Hacker News.
After researching for quite a while on tutorials teaching how to build a basic calculator in JavaScript, I've come to the conclusion that almost no one is doing this in the right way. The reader doesn't get to learn about designing/wireframing the calculator; good programming practices; the thinking process of solving problems in the calculator; the inevitable process of refactoring; and whatnot. There is so much potential for a newbie in building just this single project that I can't tell you! Honestly, it's for real!! You could start off really really simple and then slowly and gradually, but eventually, turn the calculator into a highly complex, scientific beast. And that is a difficult feat to achieve in the process of which, you'll learn countless of invaluable skills. To list a few concepts: you get to exercise your skills in designing, the HTML DOM API, events, accessibility, timers (for getting stuff added to the task queue to be executed on the next run), procedural programming (yes that's right; every other app doesn't have to be object-oriented), error-handling (using `try...catch`), string processing, and so on and so forth. Time and time again, calculator building tutorials that I've seen have been mostly large 'dumps' of code, some even resorting back to
s, with little to no explanation of stuff. It's surely very difficult to create a project that involves the reader to the very last sentence and in detail each and every step in building the calculator, but it isn't impossible. At least we can try :) And so I did. I tried creating a similar project in the given link. It's complete now and I've been working on it for quite some time. (https://ift.tt/YI7aoWZ) Do let me know of your thoughts on how useful do you think a calculator project can be in getting a newbie learner to exercise his/her knowledge of JavaScript? How useful was building a calculator for you?
Comments
Post a Comment