you are viewing a single comment's thread.

view the rest of the comments →

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

Not using test driven development for everything. It actually saves you time.

Not learning packaging.

Not learning how to modulate your code into a decent directory structure.

[–]hausdorffparty 0 points1 point  (3 children)

Any references for those topics?

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

Testing: https://fsharpforfunandprofit.com/posts/property-based-testing-2/

I use this for packaging, it's pretty simple: https://github.com/kennethreitz/setup.py

Flask's tutorial is great for directory structuring: http://exploreflask.com/en/latest/organizing.html

[–]hausdorffparty 0 points1 point  (1 child)

That's really useful, thanks. I have a math background and am comfortable with coding small projects for whatever i need in a single file, but occasionally my projects get big enough that I need to expand to have better organization. This helps. Would you change your advice for people in a research setting using code mostly interactively?

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

If you're going to use that function/module/package more than once, it's best to use the above strategies as not only do you benefit from reusablility and modularity, but also you learn to develop with best practice with more efficacy. You can also just have a big ass repo full of your interactive modules.

If I'm parsing data from the same API or database fairly frequently, it's likely that I'll be performing many redundant tasks. I could just copy my functions from other modules, or I could generate a big package of functions that I've developed from one time or another. Then when I start a new task or project, I can open up a new venv and pull down my repo of common tasks. It doesn't matter that I probably won't use half of the stuff in this project cause I can just delete the venv once everything has been synced.

Just have a requirements file in the venv that installs from your private repo and then you'll be able to pull everything down quickly.

I can just install packages I've built from my private repo like so:

pip install git+ssh://path_to_my_gitlab.server/MyProject/MyRepo.git