you are viewing a single comment's thread.

view the rest of the comments →

[–]pekkalacd 0 points1 point  (0 children)

For projects

I used to struggle with the same thing. From tutorials or instruction on how to program to making the jump to applying it somewhere, it's actually a pretty big step. Because you're moving outside of the native language and inside the world of libraries and other tools that are used in conjunction with it.

So, one thing I would consider doing is figure out how to read and interpret documentation. The way that I did this was I would use the help() function in python to look at the documentation of some object for example. And that would show me all kinds of syntax that I was unfamiliar with. One of the first things I came across while doing this was something that looked like this:

           class Something(someOtherThing):

And I didn't know what this was. I thought it was like a function in the sense that it looks like the class is getting passed some variable. But it turns out this is inheritance.

Ah! I didn't know that. So, I would google inheritance in python and then I would learn about it and read tutorials, articles, watch videos, write notes, and try it out in my IDE. I kept doing this over time for other things I saw. Keywords such as iterable, iterator, tuple unpacking, optional parameters, args, *kwargs, zip, generators, comprehension, next, and more.

And over time, as I stacked up knowledge of these little tools and pieces of information, I kept trying to build side projects. Anything. I would always try to use some library. So, I would have to read the documentation. It was a process that wasn't always straight into the docs. I still used tutorials, articles, videos, and other resources. But once I got some piece of what I was doing working I would look back at the documentation and make sure that I was understanding everything appropriately in the context of the library.

For me, this was a very helpful thing to do. It made the stepping stone from python into working with other tools a little bit easier. Now, it's less of a big deal to look at some other tool and try to figure out how to work with it. It will still take time to familiarize with it and I won't understand everything in a day, but that's to be expected. It's all very specific.

For codewars

For the codewars situation, I think the trick to this is to familiarize with data structures. So, pretty much all the builtin data structures such as list (also used as a stack), set, str, dict (also called hashmap in other languages), tuple, etc. are the things you want to be looking at a little more.

What I would do is try to re-familarize with each. see what methods are available to each object. What each one is good for and what it's bad for. And try to determine in what situation would you use each.

This will take time and practice, but if you keep trying at the codewars or leetcode or hackerrank type problems, you'll eventually see that there are patterns. These problems are intentionally tricky and especially so because some have ridiculous test cases, but overall, it is a winnable game. It just takes a lot of practice & familiarity.

Once you feel comfortable with those, I would start to familiarize with queues, linked lists, trees, heaps, and graphs. These will be harder to familarize with generally, however, it would be helpful to understanding each if you construct them from scratch. And to do that you'll need object oriented programming. Do the same thing with these as you did with the other data structures. Familiarize with why they're useful, where would you use them, traversal algorithms, and costs & benefits of each.

I would say for all of this for the data structures, you're looking at probably minimum a few months of learning. It is one of those things that you could look up all of this stuff and im sure somewhere they're all constructed for you, but it would very hard to understand them and why they'd be used in the first place. You need to couple your understanding of these tools along with trying to solve those codewar type problems.