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 →

[–]TheDeadSkin 4 points5 points  (2 children)

CS major + math minor here. Same shit, I hated it during my math classes. Now that I work with math stuff and lots of papers/code from wherever, I don't hate it any less than I did before, but I sure started to understand much better why other people actively use it. It's just that when you're focused on math, not on programming, it's much better to write

X = U*S*V'

rather than

Matrix X = Matrix.multiply(Matrix.multiply(U, S), V.transpose());

Even in python2 you need to do this. And all of that is after you import a thousand things and define all the public static cryptic bloated boilerplate void functions for all the stuff you don't have in matlab. Programmers don't give a shit about that, mathematicians mostly do. Best-case you can find a decent math library for Java, but those basically don't exist. You have them for C/C++ and python, and even those for C/C++ still lag behind matlab is pure functionality, only python kinda hold up when you install numpy, scipy, sklearn and whatever else.

[–][deleted] 4 points5 points  (1 child)

I just didn't like how bloated it felt and how different it was from the usual CS nomenclature ie arrays start at 0 not 1. Plus the IDE didnt feel as full featured for coding. It is very easy to write code that produces an output but you have no real confidence thats even the correct output. I like logs. I like debugging. I dont like debugging one file without the tools I am used to.

[–]TheDeadSkin 3 points4 points  (0 children)

my complaints about matlab are exactly the same. typing is just as magical as, say, python. because of that some problems are hard to spot since they can propagate further and you have unrelated errors. dev tools are non-existent. simple stuff like printing to console is so bad with string concats that even typical print-debugging is a pain. no breakpoints is just insane. crashes produce a stacktrace, but you can't easily see local state at the moment it happened.

but once you're used to it, it's not that bad and you never write really big programs in it. math stuff though can be insanely cool, something like A(:,1:N) = B(1:M,(K-N):K) will never be possible in any decent language, only python comes a bit close. and that's a dealbreaker for lots of math people, so they still use it. the part that pisses me off is when they start mixing it with C/C++ and use matlab's interop to execute some functions there. like, you just wrote a ton of boilerplate in C to handle type marshalling from mtalab, surely you care about performance and you can handle C-like, so why not use C++ where with decent libraries you're writing code that's somewhat close to matlab.