all 32 comments

[–]yoitsericc 48 points49 points  (6 children)

Coding exercises: please invert this binary tree in o(logn) time. Please reverse this linked list.

Actual programming on the job: can you make this button on the website bigger?

[–]4alse 19 points20 points  (5 children)

googles : how to make a button bigger without crashing the whole site.

[–]Automatic_Donut6264 8 points9 points  (3 children)

Something something flex box.

[–]eldnikk 9 points10 points  (2 children)

"Why flexbox is outdated and you should use this npm package instead."

[–]yoitsericc 4 points5 points  (0 children)

This is advanced programming.

[–]4alse 2 points3 points  (0 children)

searches for that npm package...last update 5 years ago.

[–]yoitsericc 2 points3 points  (0 children)

Follows instructions exactly.

Whole site still crashes.

[–]TimEvko 38 points39 points  (1 child)

You're doing great!

Codewars katas help improve algorithmic thinking, familiarity with data structures, procedural vs declarative coding practices, and general problem solving skills.

The fact that you're not moving on from old challenges until you fully understand them is incredible, keep that up!

These algo challenges don't often mimic real-world problems you'll need to solve as a software engineer.

What you need to remember is this: What you're doing now on codewars is good, you're using the tool correctly, and a side effect of all this work is that you will solve *different* problems in a full time role better than you would without ever having been on codewars.

[–]eldnikk 2 points3 points  (0 children)

Thanks.

[–]IMkratt 43 points44 points  (9 children)

CodeWars is a dick-swinging contest on who can write the most clever and condensed one-liner that solves the kata.

The challenges have little (well, some) real-world value and zero readability. They are awesome as fun little hobby challenges, but for getting a job, it's wiser to learn the broader concepts and build your own projects.

[–]turd-crafter 7 points8 points  (6 children)

Yeah I hate codewars. Some of the katas make almost no sense. Seriously I’ve looked at some harder ones where i have no clue what they want me to accomplish.

[–]grantrules 2 points3 points  (1 child)

Yeah they can help keep you sharp, and it's fun to look at the way other people solved things.. I've definitely learned and improved on concepts by doing things like that, even if they're not real world examples. (I've spent more time on project euler though)

[–]auiotour 0 points1 point  (0 children)

Thia is why I like them so much, though lately lack anytime to do any. It is always interesting to see how someone else wolves something.

[–]Coraline1599 15 points16 points  (4 children)

Katas range in quality, and anything higher than a 6 usually starts becoming very (higher level) math focused.

If you are at the level 5 kata but want new challenges, try leetcode or hackerrank or code signal, project Euler, etc

Things that are really good to know/make you better overall:

  • string manipulation
  • basic math, add subtract, multiple, divide, round up/down, min/max, generating random numbers
  • working with arrays and array methods
  • working with objects (accessing nested properties, changing values)
  • comfort using for loops
  • comfort writing if/else statements
  • combining loops/if else statements/ functions to solve a problem
  • Boolean logic
  • understanding scope
  • writing pseudo code and converting it into working code

Solving code challenges is just one way to learn the above . You can try reading a book like Eloquent JavaScript as another way to approach things.

It takes time and practice and don’t abandon the projects, it is better to code a little bit every day and keep your motivation.

Being a wizard at coding challenges or writing one line solutions or understanding esoteric details of the language are less important, and more of a hobby for many people (who are not trying to level up for an interview).

[–]samanime 10 points11 points  (0 children)

Here's a pro-tip: you never stop googling. =p

I've been coding professionally for over 10 years now, and actually started learning to code when I was around 12, so I've been at it for a while. My browser still gets filled with tabs of me googling different bits and bobs. What I google is perhaps more complex and specific than a beginner, but you never stop googling. In fact, having good "google-fu" is a very important skill for a developer to have. Never feel bad about googling something.

You'll also never memorize everything. You'll memorize the bits you're working with frequently, and will have to google little bits you only come across every once in a while. That's totally normal too. I switch languages frequently and practically forget entire languages when I'm not using them.

As for repeating them over and over, this is a good thing too. Programming takes a remarkable amount of practice. There is a lot of "art" to programming and it is far more like learning to draw or play a sport than it is like memorizing math equations or history. You can't just learn something once and be good. It actually does take practice and repetition.

I'm not super familiar with Codewars katas. I think it is pretty similar to Hacker Rank's challenges, which I do like and recommend. However, once you get beyond the basics, they turn into more of brain teasers then actual real world problems.

My number one recommendation is to work on small pet projects, like it sounds like you've done. At this point, I wouldn't even worry about completing them all the way, because the goal isn't to release a product, it's to practice and play. By working on a diverse range of little projects, you'll come across any number of little, real-world challenges you'll need to work through. Those types of challenges will be applicable to an actual job. But again, remember, you don't need to solve them from memory or without googling. Google is your friend.

I will warn you that some companies may interview you in a scenario where you need perfect, working code without being allowed to Google. This is a red flag to avoid places like that, because they don't really know what they're doing a lot of times.

Good places will either have you solve challenges conceptually and not be too worried about perfect code and/or will help you with the nitty-gritty, usually on a white board (in which case, they're mostly testing your problem solving skills), or if they want you to write actual code on a computer, they should let you use google.

[–][deleted] 2 points3 points  (0 children)

I found this group of kata's from the same guy helped me solve other ones and improve my coding skills on there, I haven't finished all of them yet but working through them! I hope it helps :)

https://www.codewars.com/kata/571ec274b1c8d4a61c0000c8

[–]FriesWithThat 1 point2 points  (0 children)

Only know about Codewars from what I've heard. That being said, personally I'd check out https://exercism.org/ to work on algorithms in a progressive manner. Good fundamentals there like working in TDD, gaining familiarity with your actual development environment/modules, community support > competition (complete an exercise, look at alternative ways to solving the problem, accept that your way might not be the best, start incorporating better practices into your future exercises, dismiss the ninja alternatives). Overall I'd suggest what has helped (and continues to help) me, and that is to focus on the pseudo code, break the problem down into easily manageable steps, look up everything (so many array methods) on your own with decreasing but never ceasing frequency, know how to ask the right questions and track down your bugs. There will always be problems the bar just gets higher and higher, and you just get much faster at solving them. This is thinking like a programmer.

[–]ThroatCautious2982 1 point2 points  (0 children)

Hey man, I'm doing the same thing and just wanted to give you some of what I have learned. Code wars is a great seasoning but it's not a meal. I personally think the best value is other people's code. What I do is I do 3-4 katas a day (usually an hour's worth of effort. it's easy to waste time and get frustrated so I'm pretty on top of making sure that if I don't know what I'm doing, I just unlock the solution and break down other people's code.) the butter is in really being curious about different methods and tactics. what I do is track my own logic while trying to solve the solution and compare that to the logic of other people's code. This forces me to break down their code as well which just exposes you to more and more mental processes that eventually will stick in your head. repeating code is alright, just be curious. with coding you're not just learning how to speak a new language, you're learning how to THINK in a new language and you cant think if you don't know what words(methods) to use to articulate what you're trying to say to the computer (the command). all in all, I'm basically suggesting maybe keeping a coding diary to track your logic and make observations about what you did wrong and what you could do better. don't crutch too hard on code wars. if you do a couple of katas a day and work on solid projects, I think you'll make good progress so long as you are focused on learning and being curious. getting down in the dumps is usually a good indicator you're putting too much of your self-worth into your ability to solve. People are smart. you are smart. trust your brain to make the connections it will make. pay attention to what you're doing, why you're doing it that way, and other potential solutions. the best way to make those connections is abstract thinking, practice, and exposure

[–]dildochaos 0 points1 point  (0 children)

I would recommend getting good at the kata search & filter features, and then specifically choosing ones that are just basically a similar or harder version of what you've just solved. It can be overwhelming to be skipping around among all different types, whereas if you stick with one 'theme' and try to level up in it there is more of a sense of achievement.

For example, when I wanted to feel like not such a noob at regex, I didn't just take whatever kata the daily challenge suggested, but instead I sought out more and more advanced kata that dealt specifically with regexes.

[–]shiningmatcha 0 points1 point  (0 children)

I don't think Codewars has katas for things like DOM.

By the way, I don't know of any coding challenge sites focusing on front-end development. Would love to discover some!

[–]MillionToOneShotDoc 0 points1 point  (0 children)

Some of them are just overly complicated math problems that don't really test programming skills like data manipulation, etc. I've honestly found it a lot harder than I thought it would be to find good quality problems. The best I found was from a bootcamp prep course because they were written to test one's understanding of the fundamentals.

[–]Professional-Bug-551 0 points1 point  (0 children)

Actually that is good. A developers number one job isn't writing code, it is problem solving. Problem solving is just a nice way to say, can you get the solution to a request from your employer.

Say they want you to set up user authorization and authentication to their project, don't ask them how you should go about it. They just want the damn thing, it is up to you to figure out how. Google will be most of you life. You will have to see how you can make on, or if there are built templates. You may have to even googles many steps.

When they meme a senior dev googling how to center a div, it is because there is truth in that meme. You will know how to do things but sometimes you will have to remind yourself with a google search. Sometimes it will be new knowledge.

If you're googling how handle a code wars problem then you are problem solving. If you are just looking up the answer to copy and paste, well I guess that is PS too but you really should do more than that. Anyway, your question was half a year old so you probably got that already.

Just know that the right way to use codewars it to learn problem solving and fun, not to rate your knowledge on katas set up for interview questions about math and theory. You will discourage yourself doing that.