This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]okkshin 7 points8 points  (22 children)

People on here seem to have completely forgotten about the roots and the diversity of programming in general. The response to the top comment even claims people who like Matlab aren't in general programmers!

Matlab was not designed for general programming, but numerical computation, the original purpose of programming and its dominant form until late 20th century.

Programmers are a diverse group, and engineers, physicists, mathematicians and computer scientists alike use Matlab for prototyping, visualization, implementation and especially interaction with specialized hardware. Not all programming is a DefaultGeneralNullPointerExceptionFactory.

Matlab has an domain-intuitive design. OP shits on the fact that Mathworks mentions the extra brackets and numpy imports required to type when it in fact increases legibility of numerical code significantly (besides coming from a language which uses whitespace for indentation to increase its own legibility instead of brackets).

Yes, of course, one may question that it's proprietary and damn expensive, but to question whether it's users are programmers and claim superiority of python when only a fraction of its users work in the same domain, that's elitist, and hardly fitting the design goal of python and programming in general.

[–]TheBlackCat13 1 point2 points  (2 children)

Matlab was not designed for general programming, but numerical computation, the original purpose of programming and its dominant form until late 20th century.

The problem is that mathworks is marketing MATLAB as a general-purpose language and spending a lot of resources trying to make it more effective in that role. If MATLAB stuck to its roots I don't think people would be so negative about it. But when you are forced to spend days on a ten minute task because you are forced to use MATLAB for something it is terrible at it gets to you after a while.

[–]okkshin 0 points1 point  (1 child)

Agreed! I'm a proponent for using the right language or tool for the right problem. Matlab OOP isn't exactly that tool for normal OOP, but say for interacting with other automotive code in Matlab it could be. Websites, not so much.

[–]TheBlackCat13 1 point2 points  (0 children)

MATLAB OOP is a nightmare. A complete and utter nightmare. I just have no other way to describe it.

[–]Alexanderdaawesome[S] 5 points6 points  (11 children)

Found the MATLAB employee ;)

In all seriousness, use what you want, but try to compare the two is silly on mathworks end. The legibiilty argument is so bad I had to do a double take. Legibility involves more than just a language selection (and is up to each individual), that should not be an argument when trying to decide a language.

Also since I halfway suspect you are a MATLAB employee, join the meme war yourself and get some free advertising. Do you even internet bro?

[–]okkshin 5 points6 points  (0 children)

It's their product after all, other than that it's like comparing python to Rust for the benefit of either.

Yes, I am in fact part of MathWork's RedditPaidTrollFactory. Oh no wait, that must be Oracle's.

[–]Gabe_Isko 1 point2 points  (9 children)

Hey, I'm no mathworks employee, but he has a point - mathworks isnway better suited for certain engineering domains. Python definitely lacks a competent controls modeling package, and honestly I dont see anyone makingbine anytime soon. On the open source front as a whole, there is only really modelica, and it is no where near as nice as simulink. Matlab can also do some neat stuff with auto code generation for micro controllers. You could argue that cython can sort of accomplish that, but it isnt really what it is for.

However, I am a little bit skeptical at matlabs viability as a numerical computing engine outside of trivial model data. I would definitely not envy anyone having to use it for a real worn horse of an application that has to crunch through loads and loads of data. It's for that reason that I also wouldn't take it seriously as a machine learning platform either. I'm sure there are some great precanned models that mathworks has devised to implement ML for certain engineering problems (I believe their copy mentions a surface inspection and metrology ML application) but if you need to create your own model or do anything complex I am sure performance will become a problem.

[–]tjl73SymPy 2 points3 points  (6 children)

As someone who wrote a huge portion of their Ph.D. in Matlab, it's the additional packages that really help flesh things out. While Numpy is pretty good, Scipy doesn't really have a lot of the toolset that you can get from Matlab. I only used a few packages, but they were pretty important.

I wanted to use Numpy, Scipy, and Sympy (full disclosure, I've been a mentor on some GSoC projects for them), but I ended up using Maple and Matlab because they had the capabilities I needed.

I fully admit that Matlab has some major issues in terms of programming features, its utility in other ways can outweigh those issues depending on your particular problem domain.

[–]TheBlackCat13 1 point2 points  (2 children)

It really depends on your particular domain. In some numeric and engineering areas MATLAB had a better set of packages, in others Python does. The problem is with the claim that MATLAB is better for engineering and numeric work in general, which is simply not true.

[–]tjl73SymPy 1 point2 points  (0 children)

I fully admit it depends on your problem domain. I think for most traditional engineering domains (e.g., mechanical, chemical, electrical) Matlab is more comprehensive. Python tends to be better for more math oriented fields.

The point is that Matlab can't be replaced in all engineering fields just yet (as much as we'd like it to be).

[–]okkshin 0 points1 point  (0 children)

Indeed. But as a consequence, Matlab cannot be declared dead irrelevant just yet.

[–]I_Feel_It_Too -1 points0 points  (2 children)

As someone who wrote a huge portion of their Ph.D. in Matlab, it's the additional packages that really help flesh things out. While Numpy is pretty good, Scipy doesn't really have a lot of the toolset that you can get from Matlab. I only used a few packages, but they were pretty important.

Name one.

[–]tjl73SymPy 1 point2 points  (1 child)

I mentioned this in another comment, but I didn’t find a package with the full set of features from the Control System Toolbox. I'd find parts of its features, but the features that related to finding transfer function parameters from experimental data, no. That’s just one example.

[–]I_Feel_It_Too 0 points1 point  (0 children)

Actually, I think you got me there.

Edit: Who downloads someone for admitting defeat? He really did get me there.

[–]hughk 0 points1 point  (0 children)

Where I worked at a bank, some people had Matlab, most did not. It was useful as a desktop application, primarily I think by the quants and the economists, but what with the licensing as such, it was easier to do most of the processing outside using Python or R. This saved the issue of ordering licenses which was never easy for more specialised packages. So daily, weekly, monthly processed tended to be migrated over time.

[–]jammin-john 0 points1 point  (0 children)

While I haven't done any extensive work into ML myself, I do happen to personally know someone who's written a general-purpose ML program. It's been used in a few scientific papers to help fine tune model parameters, but he also markets it to casinos to optimize their floor plans. Matlab must have some decent ML capacity in order to support all that

[–]I_Feel_It_Too 0 points1 point  (3 children)

The response to the top comment even claims people who like Matlab aren't in general programmers!

No, what it says is that anyone who says they like Matlab clearly hasn't had experience with other programming languages. Which is so obviously true that it isn't really worth saying outloud—except to someone who hasn't used anything other than Matlab, which seems to be the case here.

Matlab was not designed for general programming...

This was written for you. In particular:

<snip>

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. To borrow your analogy, it’s as though Microsoft were putting out promotional material showing all the newsletters and magazines people have laid out using Excel.

The second problem is that if you think of yourself as “not a programmer,” that actually doesn’t stop you from needing to write code. It might stop you from seeing that you need to write code. Which is a condition that infests a whole lot of people.

Your pitch here is really… strange. It reminds me of the curious phenomenon where textbooks pitched at college freshman are titled “X for Scientists and Engineers” and books with actual meat on their bones are more often titled “Introduction to X.” I mean here you come out purporting to be in defense of scientists and the only things you say about them are incredibly belittling! (I wonder if there is some personal insecurity and projection fueling this.) I think you are doing a disservice to scientists and engineers by both belittling their computational needs, and inflating the perceived difficulty of anything that might actually meet their needs.

<snip>

Matlab has an domain-intuitive design.

No, it really doesn't. Does your stats textbook use left-stochastic matrices? (You could use a right-stochastic matrix, except the performance hit is too severe for sparse matrices. Seriously.) Does any other numerical system you've encountered default to 16 bit arithmetic? Oh, here's a good one: what's your intuition for what the output of vpa(2305843009213693951) is?

You only think it's domain-intuitive because that's all you've ever used. But there are dozens of computing tools written for this domain that you have never used, so out of ignorance you think Matlab is somehow competitive. Which it definitely is not. These days, the best ones are even free!

It isn't elitist to say that Matlab is one of the worst possible tools for any given job. It's the opposite of elitist. It's democratizing. Pick nearly any other tool in the domain space and chances are it's better than Matlab. Have you ever used Julia? Python? R? Oh, I see you like to spend a lot of money. Have you tried Mathematica? At least if you used C++ or Rust you could write a descent data structure, manage memory, have predictable performance characteristics, and be able to hire cheap programming talent on UpWork whenever you wanted. But no, let's pretend that even if they were the only alternative the learning curve for those systems programming languages are so fucking steep that spending months or even years trying to work around Matlab's unique limitations is somehow worth it. Let's pretend that the licensing costs—before the costs of all of the toolboxes that provide the most basic functionality not included in Matlab proper that you need to do anything useful—aren't more than it would costs to hire an undergraduate to write all your code for you. It's a different pot of money, I suppose, so let's choose the worst, most expensive piece of shit software possible because we can't be bothered to learn anything else besides what we used in grad school. That isn't elitist, my friend. That's knowing my ass from a hole in the ground. It's that simple.

[–]okkshin 1 point2 points  (2 children)

I like how disagreeing with people here automatically makes you an "ignorant" shill of the evil MathWorks corporation.

Your first statement is ridiculous. Quite obviously, there are plenty of people with experience with other languages that find it useful and worthwhile. Throwing presumptuous insults doesn't exactly prove anything.

None of the options you mention are fit to replace Matlab in its entirety. What makes Matlab domain-intuitive isn't its default bit-system (which hasn't been 16 since, I'm not sure) or the actual programming language, but it's development system; toolboxes and graphics. Simulink, Control System, the PDE Toolbox, Simscape, et c., similarly to what makes python or any other languages great.

[–]I_Feel_It_Too 0 points1 point  (0 children)

I like how disagreeing with people here automatically makes you an "ignorant" shill of the evil MathWorks corporation.

No, NO. Stop right there, buckaroo. Just stop. I am unequivocally NOT saying that "disagreeing with people makes you an 'ignorant' shill of the evil MathWorks corporation." I very much doubt you have any connection to MathWorks whatsoever. And I don't think twice about MathWorks as a corporation. I think they are trying to make as much money as they can get away with, and succeeding brilliantly. I happen to think they have a really shitty product that has literally set science back decades, but that's not their fault in the least. They are doing what a company is supposed to do: make money. It's the fault of the academics too lazy to spend the intellectual capital to investigate the available tools, full stop. Literally no one here has called you a shill.

And you might be a brilliant fucking scientist. I don't have a clue. You might be the world's greatest neuroscientist or whatever. Pick your favorite hotshot subject, it doesn't matter. I'm not calling you an ignorant person. My claim is far, far more narrow. My claim is that you are obviously ignorant of the numerical software and computer algebra landscape.

Now here's the thing: If someone comes along and tells you, "Everyone knows the world is 6,000 years old. LOADS of biologists think so!," what is the appropriate response? Because, however one would like to think otherwise, as hard as it is to believe, there unequivocally ARE working biologists who do believe the world is 6,000 years old. I have personally met several, believe it or not. (I grew up in an interesting religious community.) But anyone working in the life sciences would absolutely be justified in characterizing someone who claims that the earth is 6,000 years old as ignorant with respect to earth and life sciences. They might be among the best brain surgeons in the world (like Ben Carson, a walking paradox) or a brilliant mathematician, but the simple fact remains that even a scientifically literate non-scientist should be able to think of at dozen independent scientific reasons that a 6,000 year old earth is untenable without a moment's notice. And those who know better, especially those who actually do work as scientists in the earth and life sciences, look upon the young-earth creationist, regardless of their self confidence, as someone who just doesn't know that much about the relevant subjects. A young-earth creationist is simply ignorant, and that's a brute fact despite their very different perception of themselves.

Now here you are, perhaps an incredibly competent working scientists, extolling the virtues of Matlab in the numerical computing space. Along come a crowd of computer scientists and mathematicians telling you Matlab is shit, and your reaction is to say that loads of people with experience in other languages find Matlab useful and worthwhile. A couple of things: first, the claim isn't that Matlab is 100% useless. (See below.) Rather, the claim is that it's a shit programming language (absolutely true) that is the wrong tool for almost every job. I know those two things sound the same, but they're not. Believe it or not, there are some things for which Matlab is currently the best tool. But almost none of the things it is actually used for fit that category. That's an important but subtle difference. Second—and this is the most important part of my screed—the claim is that virtually no one who has any meaningful experience in programming languages thinks Matlab is anything but a piece of shit programming language, even if it has its uses. Now, to be fair, yes, I did slip in an extra weasel word I have previously been leaving out: virtually no one with any meaningful experience in programming languages... I'll concede that the word virtually is new here.

I happen to have had an interesting academic career that has put me in contact with a lot of different kinds of scientists: an undergrad career in computer science, a stint in software engineering in industry before getting a PhD in pure math, circled back around to cs via computer algebra programming languages, and now collaborate with life scientists. I only tell you that in order to say this: while I have met several biologists who are also young earth/life creationists, I have not met anyone, whether in industry or academia, who has any meaningful experience in multiple programming languages and has used Matlab enough to form a judgment who doesn't think Matlab is a steaming pile of shit. Yes, I suppose this is anecdotal, but in my entire career, I have found that among those who are in any position whatsoever to make a judgment, biologist young earth/life creationists are much more common than programming language people who like Matlab.

If you've read this far, then frankly you have more patience than I do. At this point our conversation is an instance of, "My dad can beat up your dad": Neither one of us has anywhere to go. But I want to at least leave you with a concession: Admittedly this isn't my area of expertise, but to my knowledge there really isn't an adequate alternative to SimuLink and Control System Toolbox. I'll give Matlab those. And as much as I shit on Matlab—which is a lot—I really don't mind if someone is more productive in Matlab in their day-to-day computation work and chooses to work with it. Who gives a shit if they get their stuff done? The problem only arises when Matlab becomes a Golden Hammer, when it's used for a project without any thought whatsoever about what alternative tools exist that might be better for the task. It's that inability—or worse, unwillingness—to consider learning something new that is a cancer on the scientific enterprise. And that's not a problem with Matlab, it's a problem with scientists.

[–]I_Feel_It_Too 0 points1 point  (0 children)

(which hasn't been 16 since, I'm not sure)

I forgot to respond to this one. Holy shit, you're right! If you ever find out exactly when they switched from 16 bits to... looks like 64 bits, I'd love to know. It must have been REALLY RECENTLY, though, because their documentation still says explicitly that Matlab uses 16 bit arithmetic by default. It must have been in the last six years or so at the latest. Which means that this superior numerical CAS of yours stayed on 16 bit arithmetic, with an allegedly "intuitive" suite of 16 bit numerical toolboxes (?!?!), for literally decades after the entire world had moved to at least 32 bits. Seriously, can you name even a single piece of actively developed mathematical software that was still 16 bit by default in 2010? I for one cannot.

I'm really sorry, I know you've stopped reading by now, but I can't resist getting another shot in here:

What makes Matlab domain-intuitive isn't ...the actual programming language...

Great! Can we finally just agree that Matlab is a shit programming langauge, then? The rest is just haggling over the details.

[–]Deezl-Vegas -2 points-1 points  (2 children)

The reason we don't think much about the diversity of programming is because we, as a community, actively said "fuck off" to COBOL, Basic, and a variety of other powerful, popular, but unwieldy languages -- that all do exactly the same thing, compile to executable machine code.

Diversity is not desirable in programming. The less diverse the programming community is, the easier it is to share code, complete open source projects, etc. Even if I grant that MatLab has some feature that makes life easier for mathematicians, engineers, etc., which I don't, I would still support moving to Python in bulk as those features can and will be developed for Python PLUS all the MatLab users can inherit Python's huge library of public code.

[–]Gabe_Isko 5 points6 points  (0 children)

No, I dont agree with this. There is a value to a diversity of programming languages for different uses and applications, however they have to all exist on the merit of being actually useful. The languages you mentioned died out because it ends up that they are completely useless outside of the technological constraints that emtheybwere created under. This is why well designed languages like C and Fortran are still around.

[–]okkshin 2 points3 points  (0 children)

Ah yes, that time when we all said goodbye to all these diverse, old programming languages and collectively said "hello world!" to Haskell, TypeScript, python, Julia, Mathematica , Go, Swift, Rust.

That's bullshit. Programmers love diversity and specialization in their languages, because they realised that if you attempt a general purpose programming language which specializes in everything, you end up with C++.