Best practise: organising code in Julia

roh_codeur
Mon, 10 Jan 2022 21:21:34 +0000
New to Julia

Hi

A newbie here, from OOP background. I am looking to put together a project which will:

1. Download data from Internet

2. Do some manipulations on the downloaded data

3. Do some analysis on the downloaded data

Please note the downloader, analysis would be reused across other projects as well.

I have been reading up Julia docs and looking at how other Julia projects have been implemented. In Java, I would have organised these into separate packages and class files.

Options:

1. Create Modules: Julia docs suggest modules as a way to organise code in coherent units. it also seems to offer advantages like precompilation etc. When should I use Modules? what are the best practices?

2. Create multiple files and “include” them in another file. for instance, the Indicators.jl project.

Considerations while selecting an option:

1. Performance: this is key

2. Debugging: since I am new, I would like to be able to debug quickly

3. Readability and Reusability

4. Code defined in one file would be used in another file.

5. please do consider that this project would/could become quite big and comples

I am wondering which is the best practice on organising my code.

ta!

Reference:
Julia docs on Modules: Modules · The Julia Language
Example project which shows how to include other scripts: https://github.com/dysonance/Indicators.jl
my other post would point out how I plan to create my project: Best practice to support multiple implementations - #11 by stevengj

12 posts - 7 participants