# Julia for prototyping, compared to MATLAB?

**URL:** <https://discourse.julialang.org/t/julia-for-prototyping-compared-to-matlab/33900>\
**Category:** General Usage\
**Tags:** matlab\
**Created:** [January 28, 2020, 6:40pm UTC](https://discourse.julialang.org/t/julia-for-prototyping-compared-to-matlab/33900 "2020-01-28T18:40:44Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![ElectronicTeaCup](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/electronicteacup/32/12647_2.png) [@ElectronicTeaCup](https://discourse.julialang.org/u/ElectronicTeaCup)\
**Post date:** [January 29, 2020, 2:27pm UTC](https://discourse.julialang.org/t/julia-for-prototyping-compared-to-matlab/33900/21 "2020-01-29T14:27:46Z")

</div>

Yes, because they are familiar with it. The code I often get, requires me to sit down with them and “be explained” what is what—something I feel is very inefficient (documentation ftw). I have actually started using EDF.jl for accessing MEG data (from your comment from a different thread 😀) and I’m starting to see how it isn’t inherently tabular.

---

<div class="post-metadata">

**Author:** ![Ronis\_BR](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ronis_br/32/50999_2.png) [@Ronis\_BR](https://discourse.julialang.org/u/Ronis_BR)\
**Post date:** [January 29, 2020, 3:32pm UTC](https://discourse.julialang.org/t/julia-for-prototyping-compared-to-matlab/33900/22 "2020-01-29T15:32:21Z")

</div>

I am wondering if the community can help improve the Julia IDE options. Juno is good, but, as @jlperla said, it just cannot compete with MATALB. I saw that Juno is maintained by JunoLab as an open-source project in Github. Thus, is it too crazy to think about a Bounty to hire, let’s say, 3 full-time programmers for a year focusing on polish Juno experience?

I am thinking about it because to build a really good IDE without financial support seems very, very unlikely. People tried in the past to create simple text editors (like Oni), and struggled a lot to make something good without financial support.

Finally, IMHO, the “fear” to switch to Julia from MATLAB will greatly reduce with a very good IDE.

---

<div class="post-metadata">

**Author:** ![Zach\_Christensen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/zach_christensen/32/7220_2.png) [@Zach\_Christensen](https://discourse.julialang.org/u/Zach_Christensen)\
**Post date:** [January 29, 2020, 4:34pm UTC](https://discourse.julialang.org/t/julia-for-prototyping-compared-to-matlab/33900/23 "2020-01-29T16:34:43Z")

</div>

I never particularly loved the matlab IDE. I quickly switched to R and have found RStudio to be a lot better. But a lot of what has made RStudio good now is a lot of other projects that aren’t IDE specific. I honestly think that if we had the plotting ecosystem and Weave.jl in an ideal spot we could start making a killer IDE. Until then an IDE would just be a bunch of menus for people that are afraid to learn the commands for most stuff. If we don’t have the other stuff in place I don’t think we’re ready for that level of hand holding.

Edit:  
This sounds a bit harsh now that I read it. I should add that efforts for this probably aren’t wasted. We can always use whatever comes out of an effort to create an IDE once we get all the other stuff in place. I just don’t think that it will make a difference for the people that are held up on an IDE until they can have it all

---

<div class="post-metadata">

**Author:** ![Ronis\_BR](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ronis_br/32/50999_2.png) [@Ronis\_BR](https://discourse.julialang.org/u/Ronis_BR)\
**Post date:** [January 29, 2020, 4:38pm UTC](https://discourse.julialang.org/t/julia-for-prototyping-compared-to-matlab/33900/24 "2020-01-29T16:38:28Z")

</div>

I am not sure, people that install MATLAB are not afraid of the command line. They just want to install a package, open, and star to do their thing. However, I agree with you that a good, stable, fast, interactive plotting system must be available. Unfortunately, I am a user of PyPlot and have been away from alternatives since 2014 😃, so I am not aware of the state of the other packages.

---

<div class="post-metadata">

**Author:** ![DNF](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dnf/32/10191_2.png) [@DNF](https://discourse.julialang.org/u/DNF)\
**Post date:** [January 29, 2020, 5:51pm UTC](https://discourse.julialang.org/t/julia-for-prototyping-compared-to-matlab/33900/25 "2020-01-29T17:51:52Z")

</div>

> [@Zach\_Christensen](#):
>
> I never particularly loved the matlab IDE.

Only very specific parts of the Matlab IDE are particularly good, debugger, profiler, and plot interactions. The editor, for example, is badly out of date.

---

<div class="post-metadata">

**Author:** ![affans](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/affans/32/11911_2.png) [@affans](https://discourse.julialang.org/u/affans)\
**Post date:** [January 29, 2020, 6:26pm UTC](https://discourse.julialang.org/t/julia-for-prototyping-compared-to-matlab/33900/26 "2020-01-29T18:26:22Z")

</div>

I like this idea and wouldn’t mind donating a few dollars for this. It would likely have to come from the Julia business side, and probably requires a permanent programmer to maintain and release bug fixes and patches.

---

<div class="post-metadata">

**Author:** ![jonniedie](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jonniedie/32/12842_2.png) [@jonniedie](https://discourse.julialang.org/u/jonniedie)\
**Post date:** [January 30, 2020, 3:05pm UTC](https://discourse.julialang.org/t/julia-for-prototyping-compared-to-matlab/33900/27 "2020-01-30T15:05:22Z")

</div>

Whoa, I had never tried the Plotly backend, but that’s exactly what I was looking for. Thanks!

---

<div class="post-metadata">

**Author:** ![Balinus](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/balinus/32/243_2.png) [@Balinus](https://discourse.julialang.org/u/Balinus)\
**Post date:** [January 30, 2020, 3:28pm UTC](https://discourse.julialang.org/t/julia-for-prototyping-compared-to-matlab/33900/28 "2020-01-30T15:28:00Z")

</div>

> [@jlperla](#):
>
> MATLAB […] very responsive interface for plotting/etc.

Used latest MATLAB last week. Just found out that the plotting infrastructure is no longer loaded at start-up. Hence, time to first plot is not that “great” now. It’s faster to use “PyPlot” in Julia!

---

<div class="post-metadata">

**Author:** ![Balinus](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/balinus/32/243_2.png) [@Balinus](https://discourse.julialang.org/u/Balinus)\
**Post date:** [January 30, 2020, 3:40pm UTC](https://discourse.julialang.org/t/julia-for-prototyping-compared-to-matlab/33900/29 "2020-01-30T15:40:28Z")

</div>

> [@ChrisRackauckas](#):
>
> In grad school I prototyped an algorithm that would take a few months in MATLAB and decided that wasn’t my idea of a quick prototype, and so now that’s the oval2 example in the DiffEqBanchmarks is that model and it takes about 30 seconds or so to run. I think that makes a massive difference as a modeler making prototypes, but that could just be me

Was about to comment on why I think Julia is far better than MATLAB for prototyping and read your answer, which is in-lin with my opinion.

I’d like to emphasize why it think so:

In MATLAB, when I develop a function, there’s always the following pattern:

**Small function**  
MATLAB

1. write a 1st version
2. run it
3. wait 45 seconds
4. it crashes? Redo step 1-3

Julia

1. write a 1st version
2. run it
3. wait 45 seconds (or higher due to compile time)
4. it crashes? Redo step 1-3

Notice that it’s not better? Now comes the fun part. As your function/program/analysis grows, so does your codebase. Your initial function now becomes 2-3 or 10 new small functions. You’re now farther in your development so most of your initial calculations are in those functions and compiled (and debugged hopefully).

Now, you’re developping the last part of your code. Your development is now the following.

**Large function(s)**  
MATLAB

1. Continue to develop your program
2. Run it
3. Wait 600 seconds (it does not scale, unless you write functions in a compiled language. While you might do this, I’m doing science stuff in Julia)
4. It crashes? Redo step 1-3

Julia

1. Continue to develop your program
2. Run it
3. Wait 60 seconds (while compiled and fast, your functions are still not free!)
4. It crashes? Redo step 1-3

See? as your prototyping goes more complex, the prototyping waiting-time is (almost) constant! That’s the “Julia (almost) scale-invariance law” ™

---

<div class="post-metadata">

**Author:** ![djoshea](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/djoshea/32/11118_2.png) [@djoshea](https://discourse.julialang.org/u/djoshea)\
**Post date:** [January 30, 2020, 10:57pm UTC](https://discourse.julialang.org/t/julia-for-prototyping-compared-to-matlab/33900/30 "2020-01-30T22:57:19Z")

</div>

Fellow neuroscientist here, long time Matlab user and trying to switch to Julia as my daily driver. I’ve been thinking about trying to implement a Neurodata without Borders interface for Julia as a forcing function for myself to switch. Would be ideal to use the metadata provided in the datasets to construct the appropriate data structures annotated with units, probably using AxisArrays or DimensionalData. Let me know if you’re interested in chatting about how to go about this!

---

<div class="post-metadata">

**Author:** ![babaq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/babaq/32/891_2.png) [@babaq](https://discourse.julialang.org/u/babaq)\
**Post date:** [January 31, 2020, 12:01am UTC](https://discourse.julialang.org/t/julia-for-prototyping-compared-to-matlab/33900/31 "2020-01-31T00:01:27Z")

</div>

I am also a neuroscientist, and switched to Julia years ago(since v0.3) and never went back. some of the hardware related data parsing is constrained by the vendor using MATLAB libraries. but most of the data analysis(EPhys, 2p imaging) are now in Julia.

I am also successfully convinced a close colleague who is also a long time MATLAB user to switch. now we are working together on a neural single analysis [package](https://github.com/Experica/NeuroAnalysis.jl).

The pros and cons of MATLAB and Julia have been explained by many in this threads. so I guess you just have to read, learn and use more Julia, then you will grow the confidence about the language, ecosystem and the community.

---

<div class="post-metadata">

**Author:** ![Zach\_Christensen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/zach_christensen/32/7220_2.png) [@Zach\_Christensen](https://discourse.julialang.org/u/Zach_Christensen)\
**Post date:** [January 31, 2020, 12:14am UTC](https://discourse.julialang.org/t/julia-for-prototyping-compared-to-matlab/33900/32 "2020-01-31T00:14:20Z")

</div>

I’m currently waiting for [NeuroCore.jl](https://github.com/JuliaNeuroscience/NeuroCore.jl) to register. It’s intended to be a common interface for neuroscience data. I have been playing around with as many corner cases and concise documentation examples so it’s in good shape to help people build on. I need to fix some stuff once it’s released so it’s more friendly for people to develop on top of, but then I’ll be in super documentation and bug squashing mode with it.

Feel free to raise issues in NeuroCore for how to interface with it or just to get my attention for a neuroscience package you want to collaborate on. It’s all in the JuliaNeuroscience organization so that we can put neuroscience tools in a more central place if beneficial (I’m not saying everyone needs to give up ownership of packages to JuliaNeuroscience if they want to collaborate).

---

<div class="post-metadata">

**Author:** ![ElectronicTeaCup](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/electronicteacup/32/12647_2.png) [@ElectronicTeaCup](https://discourse.julialang.org/u/ElectronicTeaCup)\
**Post date:** [January 31, 2020, 9:24am UTC](https://discourse.julialang.org/t/julia-for-prototyping-compared-to-matlab/33900/33 "2020-01-31T09:24:29Z")

</div>

Would love to hear more about this: we should all discuss this on the #neuro on the julia slack channel! Haven’t seen any activity there, so this would be something nice to start of the conversation.

---

<div class="post-metadata">

**Author:** ![ElectronicTeaCup](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/electronicteacup/32/12647_2.png) [@ElectronicTeaCup](https://discourse.julialang.org/u/ElectronicTeaCup)\
**Post date:** [January 31, 2020, 9:26am UTC](https://discourse.julialang.org/t/julia-for-prototyping-compared-to-matlab/33900/34 "2020-01-31T09:26:54Z")

</div>

This is precisely why I was really frustrated with MATLAB during the final stages of my masters thesis. I had these terribly long scripts with long waiting times.

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [January 31, 2020, 9:41am UTC](https://discourse.julialang.org/t/julia-for-prototyping-compared-to-matlab/33900/35 "2020-01-31T09:41:00Z")

</div>

> [@Balinus](#):
>
> Julia
> 
> 1. write a 1st version
> 2. run it
> 3. wait 45 seconds (or higher due to compile time)
> 4. it crashes? Redo step 1-3

That’s not how I develop Julia code. I usually

1. create an empty package using a template,
2. activate it,
3. start [test-driven development](https://en.wikipedia.org/wiki/Test-driven_development), working on the code and the tests at the same time.

I rarely ever experience compile times longer than 2s (on a puny laptop, thanks to the amazing Revise). If I have to work on large data with long runtimes, the first thing I do is create a small mock dataset generating function for the unit tests. Just to clarify: I use this workflow for anything nontrivial that does not end up in a public package, not just for libraries.

I think that it is advantageous to recognize from the very beginning that [Julia requires a different workflow](https://docs.julialang.org/en/v1.5-dev/manual/workflow-tips/).

Trying to use it like Matlab or R is like peeling carrots with a flathead screwdriver: technically possible, but immensely frustrating and a waste of a good tool.

---

<div class="post-metadata">

**Author:** ![ElectronicTeaCup](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/electronicteacup/32/12647_2.png) [@ElectronicTeaCup](https://discourse.julialang.org/u/ElectronicTeaCup)\
**Post date:** [January 31, 2020, 9:49am UTC](https://discourse.julialang.org/t/julia-for-prototyping-compared-to-matlab/33900/36 "2020-01-31T09:49:44Z")

</div>

> [@Tamas\_Papp](#):
>
> I think that it is advantageous to recognize from the very beginning that [Julia requires a different workflow](https://docs.julialang.org/en/v1.5-dev/manual/workflow-tips/)

I totally agree with this (at least when compared to MATLAB)—and this is primarily an issue with people who aren’t experienced with programming and want a MATLAB to Julia “cheat sheet”. I feel a lot of tutorials make a similar mistake, essentially showing “how Julia can do what matlab can do” with the same workflow.

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [January 31, 2020, 9:53am UTC](https://discourse.julialang.org/t/julia-for-prototyping-compared-to-matlab/33900/37 "2020-01-31T09:53:20Z")

</div>

> [@ElectronicTeaCup](#):
>
> people who aren’t experienced with programming and want a MATLAB to Julia “cheat sheet”

They [shall not go wanting](https://docs.julialang.org/en/v1.5-dev/manual/noteworthy-differences/#Noteworthy-differences-from-MATLAB-1).

---

<div class="post-metadata">

**Author:** ![danielw2904](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/danielw2904/32/10890_2.png) [@danielw2904](https://discourse.julialang.org/u/danielw2904)\
**Post date:** [January 31, 2020, 10:32am UTC](https://discourse.julialang.org/t/julia-for-prototyping-compared-to-matlab/33900/38 "2020-01-31T10:32:02Z")

</div>

Are you using PkgTemplates.jl for the templates? Or do you have your own? I switched from R to Julia and have not figured out a work flow yet. At the moment I keep a module in a sub folder of the project and include and load it (thanks for the revise hint). This way I can keep the module and the analysis in the same folder in one git repository. My understanding is that Julia has a dev folder in ~/.julia and keeps user packages there and therefore not in the same repo. Do you have any suggestions for source control of projects that have a module + a notebook or file to create the actual output? Or is this entirely the wrong way to go with Julia?  
Thanks!

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [January 31, 2020, 10:38am UTC](https://discourse.julialang.org/t/julia-for-prototyping-compared-to-matlab/33900/39 "2020-01-31T10:38:32Z")

</div>

> [@danielw2904](#):
>
> Or do you have your own?

> **[GitHub - tpapp/PkgSkeleton.jl: Generate Julia package skeletons using a...](https://github.com/tpapp/PkgSkeleton.jl)**
>
> Generate Julia package skeletons using a simple template system - GitHub - tpapp/PkgSkeleton.jl: Generate Julia package skeletons using a simple template system

> [@danielw2904](#):
>
> suggestions for source control of projects that have a module + a notebook or file to create the actual output?

For projects, I keep runtime code in the `script/` directory of the package, and have a `results/` folder for the output, but since this does not really matter you are free to do what you like.

---

<div class="post-metadata">

**Author:** ![danielw2904](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/danielw2904/32/10890_2.png) [@danielw2904](https://discourse.julialang.org/u/danielw2904)\
**Post date:** [January 31, 2020, 12:59pm UTC](https://discourse.julialang.org/t/julia-for-prototyping-compared-to-matlab/33900/40 "2020-01-31T12:59:38Z")

</div>

Thanks! I’ll check that out. 🙂

[Previous page](https://discourse.julialang.org/t/julia-for-prototyping-compared-to-matlab/33900.md?page=1)

[Next page](https://discourse.julialang.org/t/julia-for-prototyping-compared-to-matlab/33900.md?page=3)
