Live data from Hacker News

Matlab is oversold as a general-purpose language

abandonmatlab.wordpress.com

91–100 of 104 posts

Re: Matlab is oversold as a general-purpose language

#91
post #82
post #77

Earlier quoted context omitted.

So a specific graphics toolkit then? Is it one that is included with Matlab or another toolkit that is necessary to pay in addition for?

Matlab is usually run as an ide with an interactive window (command line interpreter). Graphics are built in and interactive, you can interact with any number of graphics windows and with the command line at the same time (this is difficult to do in python numpy and matplotlib), and you can tweak the graphics windows from the command line to add GUI buttons, boxes, etc. This all comes built in to the most basic MATLA…

Ah, you meant the GUI, not specifically the handle graphics properies, and a GUI to manipulate the graphics.

This is all in development and almost completely functional in the current Octave dev branch. I hope our next upcoming release will satisfy you more.

Re: Matlab is oversold as a general-purpose language

#92
post #47

It's strange there're no single comment about Octave — http://www.gnu.org/software/octave/ It's free software and the language is 99% compatible with Matlab. Edit: and yes, Matlab is not intended for any generalisation/abstraction. It's a big scientific calculator with REPL. And complicated program in it still feels like big calculator

And it shares all of its weaknesses. So why bother when there are alternatives like Python or R available?

Not all of them. Some of the most annoying things about the Matlab language we attempt to fix, as long as we can still run existing Matlab code. For example, you can index temporaries in Octave: x = sin([1, 2,3])(2). A few more things here:

http://wiki.octave.org/FAQ#What_features_are_unique_to_Octav...

Re: Matlab is oversold as a general-purpose language

#93
post #72

Earlier quoted context omitted.

Can you be more specific?

I'm not the parent commenter but I've used matlab extensively and found Numpy clunky in comparison. All I ever did in matlab involved matrices (usually differential equations with matrix coefficients and other things of that nature) and matrices are super easy to use in MATLAB: A = [1 2 3 4 5 6]; or A = [1 2 3; 4 5 6]; I can input A just like that and it works, try out the python syntax: A = array([[1,2,3],[4,5,6]])…

Matlab has a terse syntax for 2D matrices. Try creating 3D, 4D and 5D matrices, and the syntax is suddenly completely different.

Re: Matlab is oversold as a general-purpose language

#94
post #84

Earlier quoted context omitted.

> But it would be beneficial for science if code was treated as important as the paper itself. One could argue that it isn't. In science, the concept is usually more important than the implementation. But I totally agree. Scientific code tends to be awful and I wish I knew what to do about that.

That is one point of view. Another is that the entire scientific community is entitled to peer review your work, and you should enable them to. Not just your referees, who will likely not compile and test your code, anyhow. The concept may be the most important thing, but what good is a paper asserting some new concept if everyone can't verify it? I think it is the approach that folks like Fernando Perez at ipython a…

I LOVE ipython and its notebook! It is seriously one of the best things to happen in the last few years for scientific computation and teaching! So amazing!

Re: Matlab is oversold as a general-purpose language

#95

From the article: > The first problem is that the MathWorks actively markets MATLAB as a “general purpose programming language” with all the trappings, something which it is manifestly not. From MATLAB site http://www.mathworks.com/products/matlab/ : > MATLAB® is a high-level language and interactive environment for numerical computation, visualization, and programming. "high-level" != "general-purpose". The author g…

To be fair, what their website says and what their sales people might be saying in the field could be two different things.

Re: Matlab is oversold as a general-purpose language

#96
post #9

Okay, I'll bite on this one. I used matlab quite extensively (for years) in the medical imaging field, as well as other miscellaneous engineering (read: electronics, modeling, FEA. Not web apps) disciplines. I noticed several things about the matlab culture: - In academia, people really do not seem to give a fuck about using the right tool for the job. I used to try to explain to the people in my lab why their softwa…

This.

I couldn't agree more. WHile I've had only a brief stint with MATLAB at an internship, the code was possibly the ugliest thing I'd ever seen. Given that I'm a physics major and will probably be encountering matlab quite frequently, I sure hope that it won't be so horribly documented, and just so unreadable.

I was so offended, I had to rewrite over 2000 lines of code in python, and on completion, the python code was a little of 700 lines, clean, and so god-damn readable.

To any other academics out there, I urge, no plead with you to consider using a more general purpose programming language. It is a nightmare for undergrads like me to try and extend matlab to further applications.

However, I'm glad to say that the first computational physics course we will be taking at our university teaches us python, thankfully someone in the department had a clear view of what was going to benefit us.

Re: Matlab is oversold as a general-purpose language

#97

Earlier quoted context omitted.

I have seen some horrible shit. Terrible, awful, fucked up stupid undocumented code. I have worked in psychophysics shops (go figure). What makes you think it would be any better had they not used MATLAB? I actually like MATLAB. It really excels when used as a glorified calculator and you can plug lots of things into it and have it 'just work' without much fuss. When I worked in a tutoring lab sometimes it was cool t…

One of the problems with Matlab is that it does not encourage any sort of partitioning scheme for code. It even makes the simplest form of partitioning (functions) excruciatingly frustrating by requiring them to live in their own files--thank god there are subfunctions, nested functions and anonymous functions. But there is still no notion whatsoever of namespacing, modules or a usable class hierarchy. It is thus ver…

Yes, the fundamental problem of the Matlab language is the namespace problem.

The hilarious thing is that basically every feature added to the Matlab language since the beginning has been an attempt to control the namespace problem, and they still can't solve it. Besides subfunctions, nested functions, and anonymous functions (and does anyone using them actually understand all of their scoping rules), you have old style classes, new style classdef, packages, and sometimes case-sensitive and sometimes case-insensitive identifiers.

It's a mess. And I don't think it will ever get fixed.

Re: Matlab is oversold as a general-purpose language

#98

Wow, that whole blog is focused on bashing Matlab. I find it a little difficult to trust a source that biased. If they can't find something good in a product that has been around for, according to wikipedia, something like 30 years, then that source shouldn't be trusted. I searched around to see if I could find something about the author but didn't see anything. Curious to see what their reasoning is.

The author does acknowledge the good parts of Matlab right off the bat in his first post:

https://abandonmatlab.wordpress.com/2009/07/23/hello-world/

Re: Matlab is oversold as a general-purpose language

#99
post #97

Earlier quoted context omitted.

One of the problems with Matlab is that it does not encourage any sort of partitioning scheme for code. It even makes the simplest form of partitioning (functions) excruciatingly frustrating by requiring them to live in their own files--thank god there are subfunctions, nested functions and anonymous functions. But there is still no notion whatsoever of namespacing, modules or a usable class hierarchy. It is thus ver…

Yes, the fundamental problem of the Matlab language is the namespace problem. The hilarious thing is that basically every feature added to the Matlab language since the beginning has been an attempt to control the namespace problem, and they still can't solve it. Besides subfunctions, nested functions, and anonymous functions (and does anyone using them actually understand all of their scoping rules), you have old st…

I usually find nested functions and closures to be more pleasant to use than Matlab's class system. A sad state of affairs, really.

Re: Matlab is oversold as a general-purpose language

#100
post #9

Okay, I'll bite on this one. I used matlab quite extensively (for years) in the medical imaging field, as well as other miscellaneous engineering (read: electronics, modeling, FEA. Not web apps) disciplines. I noticed several things about the matlab culture: - In academia, people really do not seem to give a fuck about using the right tool for the job. I used to try to explain to the people in my lab why their softwa…

This. I couldn't agree more. WHile I've had only a brief stint with MATLAB at an internship, the code was possibly the ugliest thing I'd ever seen. Given that I'm a physics major and will probably be encountering matlab quite frequently, I sure hope that it won't be so horribly documented, and just so unreadable. I was so offended, I had to rewrite over 2000 lines of code in python, and on completion, the python code…

> Given that I'm a physics major and will probably be encountering matlab quite frequently, I sure hope that it won't be so horribly documented, and just so unreadable.

Coming from another physics major... don't get your hopes up. Just do your thing and hope that others follow suit.

> I was so offended, I had to rewrite over 2000 lines of code in python, and on completion, the python code was a little of 700 lines, clean, and so god-damn readable.

It's amazing how easy it is to rack up 2000 lines of matlab repmat mashing. On the bright side, at least your lab didn't insist that you stick with their nightmare of .m files.

> the first computational physics course we will be taking at our university teaches us python

Indeed, that should be fairly pleasant. Particularly because you can easily implement a lot of the iterative algorithms without needing to translate all of the mathematical 1-indexed stuff into c-like 0-indexed memory. Can't tell you how many bugs I had because of that.

My first comp phys course was taught using only barebones C. We had to implement all the numerical routines from scratch, with nothing but stuff like stdlib.h, math.h, etc. In later courses they allowed us to use whatever we wanted really, but often the techniques would be very complex and the prof would provide some matlab code for us (e.g. an n-dimensional meshing routine) that was too much of a hassle to re-implement, so I ended up doing a lot of it in matlab anyhow :-/

Post reply on HN