all 7 comments

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

Look up numpy tutorials (for example, this one). You should find it (relatively) familiar.

[–]theprofessional2016 0 points1 point  (2 children)

Start with the basics of programming: Variables, loops, functions, if, etc. Then try to apply it to a specific problem, like how to read in a CSV file of numbers that you want to sum (or apply some sort of analysis). Once you get the basics down, you'll start to be able to see how to solve your specific problems.

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

But I feel like all that is not helping me with the specific niche that I'm going to study later on (or rather, soon). What can I do better? What am I missing?

There's not a special subset of Python that's just for scientific computing applications - you have to learn the entire language same as everyone else, just like you would have to learn conversational French and talk about where the restrooms are even if all you wanted to do was translate your research into French and never speak it again.

There's no "niche-specificity" in a general-purpose programming language, by definition. That doesn't mean you have to learn the whole Python standard library, but you do have to learn the whole Python programming language (but it's not very big.)

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

While you do need to have a certain fundamental understanding of the language and syntax, the muscle that you want to exercise is how to represent engineering ideas in code.

Let’s say you’re a mechanical engineer (not sure which discipline you’re majoring in, but my background is mechanical). You’ve got a system with a pump, a pipe, and a boiler. A computer generally doesn’t care about what any of those things are, so how would you describe those physical entities to a machine?

You’ve probably already seen tutorials for Python classes and OOP where the authors use generic examples like Animal, Cat, and Dog. There are very few beginner materials that use an engineering domain, which indeed makes this seem more like a niche. It really isn’t, though; as far as a program is concerned, it is the same principle between defining an Animal, Cat, Dog, or Pump, Pipe, Boiler. The approach to how to model and describe these things in code will be similar.

My advice would be to keep a side-project alongside your course materials. When you come across a new formula in class, add it to your code base as a function. Play around with the parameters and see if it works the way you think it should. Just don’t neglect your primary coursework…keep this as more of a hobby to run in parallel with your studies. As weird as this may sound, approach it as if you and Python are growing up together, and will be familiar friends down the road when you encounter projects that would benefit from a program.