Day 1 Jan 3:
What's 151 Days of Code?
- I heard of this challenge on Tanay Pratap's discord server. The challenge is to write code for 1 hour daily for 151 days. Then either tweet about it or write a weekly blog post.
- The challenge started on 1st Jan, but I am starting from 2nd Jan
Why am I taking part in it?
- Right now I am in a position where I want to accrue as many skills as possible and to be decent at them. Aside from that I also want to clear the coding interview. To do both, I have to consistently do increasingly complex, projects and DSA problems.
How am I going to do it?
- Track my time spent for the challenge and
- Track the progress done in that time
Progress:
- Setup local React environment and deploy a basic react app
-> Local Setup Guide.
event
from event.target.value
is deprecated.
Day 2 Jan 4:
issues faced:
onchange not working:
- MDN
- The code above is working on MDN site but not locally.
- Reasons:
- event must be passed as a parameter in the function
input1.addEventListener('change', updateValue);
function updateValue(e) {
console.log("change detected");
input2.hidden=false;
btn.hidden=false;
}
- give
element.hidden = false;
instead of giving element.hidden="false";
Progress:
- Worked on making a cash-register app in VanillaJS.
- Completed the functionality. Style improvement is left.
Day 3 Jan 5:
issues faced:
- making the UI responsive. Although I tried, the UI may still break on some screens.
Progress:
- Added style to cash register app
- Fixed the reuse functionality => if the user interacts with the app again without reloading it first, it gives correct output now
- Did some DSA coding
Day 4 Jan 6:
- No coding
- Read about clean code
- Read about thinking and writing down what you are going to code before you jump to building
Day 5 Jan 7:
NamasteyJS - by Akshay Saini
Day 6 Jan 8:
NamasteyJS - by Akshay Saini
Day unknown
- I wasn't consistent with the challenge but I surely did something in these days.
- However, I am not content with my output.
Observations (Take these with a grain of salt):
- When doing DSA questions for practice, don't give yourself unlimited time for any question. In any coding interview, they are not going to give you much time to think of an approach at the least. Open a question and start a 15 minute timer, within which to think of an approach to solve the problem and then start coding.
- Do not start thinking of an optimized approach in the beginning. You might end up not solving the problem at all. Inefficient and working is better than Optimum and not working.
- Having a basic knowledge of DS and algorithms saves time as compared to jumping into the question and learning on the spot (to each their own, but this seems true for me).
- One should not focus on just DS or just Algos, when you're solving problems. You have to think in both terms, which DS would be best suited and which Algo would be more efficient.