4 Jan 2023
4 min read
At least that happened to me before, I planned for my interview by reviewing some React interview questions, remembering how to use
useEffect correctly “I always forget the clean-ups”, and a quick review
There are two ways to transform code into machine language that is understandable by computers:
All languages have to be interpreted and compiled because it has to run “interpreted” and also it has to get translated to a lower-level language like machine code.
And the real challenge, if you don’t understand what is the call stack or the memory heap, you can run into some serious problems that would show poor engineering skills like:
No, not the famous site you visit daily, it’s the big red error that pops in your console, with no clue what did you do wrong in order.
It happens when we keep trying to call functions nested inside of each other over and over again. Something like a recursive function without a success state or a return state.
// By this way, we would keep adding things to the stack more and more.
I’m sure you encountered this error before, maybe after checking whether you’re iterating correctly in your array of data, and it means you ran into an infinite loop.
let arrayOfTrials = ;
Memory leaks don’t only happen on looping inside of an array but also in some unfamiliar cases like:
1. Keep adding variables to the environment as global variables will add more and more pieces of memory.
2. Adding event listeners to one of the elements in your document and never removing them when you don’t need them fills up your memory.
setInterval() which is a method that continues calling the function until you clear it, and you forget about clearing it by using the
Always return to the origin of the language you use in your framework or library, I know companies are looking for a specific field in frontends like a React Developer or an Angular2+ Engineer, but it’s always better to adjust yourself to a new library or framework, rather than working with a language you don’t understand its core.
Don’t put yourself as a framework engineer, dig deep, know why, and understand the concepts of a certain language, that’s when you can do powerful things!
See other articles by Youssef
Ground Floor, Verse Building, 18 Brunswick Place, London, N1 6DZ
108 E 16th Street, New York, NY 10003
Join over 111,000 others and get access to exclusive content, job opportunities and more!