calculator's People
calculator's Issues
Feedback
Yousif's Calculator
Hi Yousif. Thanks for sending in your calculator. I'm putting on my hat as HYF mentor in judging your work. I warn you that you may not like what I'm about to say.
I have cloned your repo, typed yarn install
and yarn start
and am looking at the screen that appears.
About the calculator itself
-
This is not the scientific RPN calculator I asked for. It looks like a traditional, algebraic calculator with some very limited scientific functions. How can I compute the Rydberg constant with this calculator? How do I enter a real number with exponential notation, like the mass of an electron (9.10938356e-31 kilograms). There is no key to enter a decimal or a way to enter the exponential part of a real number.
If this was an assignment from a potential employer to decide whether to hire you I'm afraid you wouldn't get the job. ("Yeah, real clever guy, but doesn't do what you ask him to do.")
-
Part of the assignment is to do research into an existing product to discover how it works and to reverse-engineer it. So it's not just about coding.
-
When I start up the app I am immediately confronted with warnings:
./src/App.js Line 3: 'isCompilable' is defined but never used no-unused-vars Line 3: 'isBracketBalanced' is defined but never used no-unused-vars Line 3: 'isOperatorBalanced' is defined but never used no-unused-vars ./src/util/calcUtil.js Line 98: Expected an object to be thrown no-throw-literal Line 244: 'node' is defined but never used no-unused-vars Line 251: Expected an object to be thrown no-throw-literal Line 258: Expected an object to be thrown no-throw-literal Line 266: Expected an object to be thrown no-throw-literal
The fact that these warnings are here signals to me that you were in great haste to deliver this result. I would have preferred for you to take more time to remove the warnings (putting aside the issue that this is not the calculator I asked for in the first place).
-
I'm at a loss how to operate this calculator. What does the
()
button do? What isFilter
?
The Source Code
-
Your repo is missing a
.gitignore
file (e.g. excluding thenode_modules
folder). In VSCode I immediately get a warning that there are too many files to track. -
I have a spelling checker enabled in VSCode (see my VSCode Tips) and several spelling errors are highlighted when I open up App.js, e.g.
clearPannel
->clearPanel
,filterd
->filtered
. You may think 'nitpicking' but I think 'sloppy'. -
More seriously is the misspelling of
calssName
which should beclassName
. Because of this any styling depending on the class name will fail. -
What do you mean with the prefix
ptn
? Did you meanbtn
for button? -
You are making heavy use of
refs
. But this is actively discouraged "Avoid using refs for anything that can be done declaratively." See Refs and the DOM. -
In calcUtil.js the spelling checker flags
Faild
in line 266. I wonder what 'failed' here. Again, these are silly spelling mistakes that you should try and avoid. -
I've not further examined the code in calcUtil.js. I'm sure you've done clever things and had a lot of fun, but the end result is something completely different than was asked for.
Closing thoughts
Yousif, I may have been a bit harsh in my comments, but is important that you understand that being a professional developer is not about doing clever things in the shortest amount of time possible, it is about painstakingly meeting (or exceeding) your customer's requirements.
Perhaps you want to rethink the project and try and build the RPN calculator that was asked for. If you do, make sure that I can compute the Rydberg constant with it. If you've done that and found it too easy then, for instance, extend the calculator with programmability like found in the HP 25. Of course, if I haven't completely turned you off and you still have time.
Best wishes,
Jim
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.