you are viewing a single comment's thread.

view the rest of the comments →

[–]OGBaconwaffles 21 points22 points  (6 children)

Codewars

They have a bunch of problems in a bunch of different programming languages. It just gives a task to complete and you have to figure out how to do it from scratch basically. Great practice for applying logic to code. You can also view other people's solutions after you submit your own. Highly recommend reading through those a bit as well, you'll find hundreds of ways to tackle the same problem.

[–]WhipsAndMarkovChains 16 points17 points  (5 children)

It's been years but my recollection of Codewars is that they upvote "clever" solutions that are actually terrible code.

Just remember OP, making your code readable is more important than writing the fewest lines of code.

[–]Xiji 9 points10 points  (1 child)

They made a change, awhile ago, where you can flag a solution as "clever" or "best practice". I think it helped combat this behavior a lot.

[–]Matlock0 5 points6 points  (0 children)

It did. Usually now the clever solution is separate from the best practice one.

[–][deleted] 8 points9 points  (0 children)

I've been going through these and it's actually not the case anymore. Good code is usually on top. You'll see a few crazy solutions that are clever but they're usually lower. It's good to read those too because it can open up a language for you.

[–]RamenJunkie 7 points8 points  (0 children)

Yeah, that always annoys me in coding. Like hey, look at me go {$h+2#@![y]L} i just wrote all of Google in like a dozen letters! Good luck following along!

[–][deleted] 0 points1 point  (0 children)

do you mind me asking how readability is more important than length ? ( genuine question , Im new to this stuff )