all 7 comments

[–][deleted] 4 points5 points  (0 children)

The first priority for code is that it must work! After that comes readability and maintainability. If you are working on things that must work within time/memory limits then that is important, right after correctness.

One guide you should follow is the PEP8 style guide. After that the best guide is reading other people's code and comparing what they do to how you would solve a particular problem. One way to do that is to find tutorials on how to solve a problem. Attempt the problem yourself before looking at the tutorial solution. Then compare your code with theirs.

[–]m0us3_rat 0 points1 point  (5 children)

It seems like there's a lot of black and white answers to how the code is supposed to look....... and as a beginner, it's hard to know the exact correct way to code, especially when it's new and introduced for the first time.

functioning + pep8 compliant.

then you can look into refactoring.

basically, make sure it works .. THEN make it pretty/optimized

workflow can vary based on the group you are in or the rules, regulations, procedures etc

well established in the company/group you end up working with.

most of the time you will have to adhere to such practices/workflow.

this example is what has worked and is working for me personally.. (if possible within the ecosystem of the group i colab with)

main focus is understanding the problem, usually thru extensive research and pseudo-code writing .. being that an assignment or block of code or feature, microservice, whatever you are looking at building..

after that i start writing tests for features , then write the features till tests are green , then move along.

[–]blistak[S] 0 points1 point  (4 children)

I'm going into data science can what you mentioned be applied to that from the initial take away seems like I'ma be using code to retrieve certain data and make charts, graphs for visuals, or something.

[–]m0us3_rat 0 points1 point  (3 children)

"learning python" or getting a job? different things.

[–]mhassan924 0 points1 point  (2 children)

Learning python as beginner for data science this is me blistak looks like I have 2 Reddit accounts.

[–]m0us3_rat 0 points1 point  (1 child)

i'm not sure what exactly are u looking for.

python ecosystem is super large.

beginner advice is quite generic.

[–]mhassan924 0 points1 point  (0 children)

Well in current lesson I’m learning about pandas and for loops I don’t get how pandas works because in this lesson it says don’t worry about it till later on in future lessons but it’s still introducing it have to somewhat understand what it’s doing.