User
Write something
Coaching Call is happening in 25 hours
PSA about Codewars solutions
Whats good yall Just a quick PSA for those just starting coding problems, so yall can avoid the mistakes I made when starting out I was practicing some Codewars, when I saw this solution at the top. Although it looks very flashy because its 3 lines, its actually terrible! The right solution is BigO(n), but this solution is BigO(n^3)!! As indexOf and lastIndexOf both loop through the array. The next "Best Practices" solution uses an obscure mechanic, a ^ bitwise operator ! Imagine how hard it is to debug a codebase full of this flashy programming😭😭😭 The "Best Practice" practically speaking, is a solution that is easy to read and understand, even if it requires more lines of code. So don't feel down if you're solution isn't haiku-level brief! If it's readable and understandable, its good. 🫡
PSA about Codewars solutions
To Whom It May Concern
Those of you who got coding jobs, how are you faring? What's the work like, do you enjoy it, is it office work or WFH etc.Let the rest of us know, maybe it will be motivating but I'm just asking because curious.
Tic-Tac-Toe
I’m about to start the React course, and since Tic-Tac-Toe is one of the projects included, I decided to first build it using vanilla JavaScript. This way, I can compare the two approaches and better understand the benefits React brings. I know there can be some UI improvements but I focused more on the JS and I am also impatient to start React. Here it is: https://codepen.io/freedomseeker/pen/dPYQKgq?editors=1111 Any suggestions welcome!
Do you have any good codewars katas to share?
Thought to ask if any of you had a memorable kata that either taught you something useful or was just fun to solve. Personally I've started trying out some 5 and 4 kyu ones and those can get really fun sometimes.
Random Learning - an overlooked detail
I just learned that declaring a variable using 'const' doesn't mean it can't be altered, it just means that the variable can't be reassigned. For example: const arr = []; arr.push(10) //Adds 10 to the arr without any problem, whereas arr = [10] //Throws an error saying "TypeError: Assignment to constant variable." Just learned it as I observed the array "header" towards the end of this video How to convert "camelCase" to "Camel Case"? - Javascript For Beginners II · Developer Pro ----------------------------------------------|||||||||||||||||||||||--------------------------------------------------- And one more thing..... to convert "camelCase" to "Camel Case", "const newText = string.replace(/([A-Z]+)/g, ' $1') .replace(/^./, str => str.toUpperCase() )" can be used instead of "const newText = string .replace(/([a-z])([A-Z])/g, "$1 $2") .replace(/([A-Z])([a-z])/g, " $1$2") .replace(/\ +/g, " "); const nextString = newText[0].toUpperCase() + newText.slice(1);" to do the exact same thing. Works for any type of string and that "+" after "[A-Z]" makes all the difference.
1-30 of 111
Developer Pro
skool.com/developerpro
Learn how to code. Make money. Have fun. Enjoy life.
Leaderboard (30-day)
Powered by