My dysfunctional relationship [with MATLAB]

Going on ten years (eep!). ML (as I’ll call it) and I got together in grad school. At the time it seemed like a good match. Oh, I suppose it was never exactly true love. I guess ML didn’t always treat me right… for example, there was this whole vectorization thing whenever you wanted to do anything quickly. Lame, right? But I learned to live with it. And once you get used to a partner’s quirks, it’s really hard to get out of the relationship. Really hard to think you’re going to have to learn a whole other set of quirks if you try again with another language. And of course there are the other ones out there that are even worse than your current partner. I watched my friend and his ups and downs with C, and I said, no thanks – C seems even less suited for me than ML. I mean, C seemed nice enough, don’t get me wrong, rather nicer than ML all things considered, but wow, so high-maintenance!

ML and I stuck together as I started working, though I did start to be good friends with C++ at the time as well. Things went from okay to worse. I realized ML did not encourage me to be a good code writer, but rather encouraged bad habits. This was okay in grad school, but now that I wasn’t in school anymore and having to share code with others it was kind of hindering my other relationships. And things that should be easy were sometimes very hard to do. And I was noticing more and more that communication between us was… difficult. Something would go wrong and it was often pretty hard to read in between the lines, or even on the lines, to see what was to blame. It was getting pretty strained between us. My relationship with C++, even though it never really impinged on my relationship with ML – they filled two separate functions in my life – showed me even more the flaws with ML.

Friends noticed ML had some major flaws. My best friend [mr. hunter] tried to gently persuade me I should leave ML. He talked about how he knew of others, Perl or Python, that might be better for me. He fixed me up on a date with Perl but it never really worked out between us. I guess it was hard for me to let go of ML and I never got to know Perl well enough.

Finally, another friend – not even a close one – sat me down and read me the riot act. He told me all the reasons why ML sucked, how it was treating me badly, how it was all wrong for me. He all but forced me into a blind date with Python, whom he thought would be a perfect fit.

And… I went on a date with Python. And we totally clicked. And it was awesome. It was such a relief to be with someone who was okay with, who even encouraged for loops! Who was relaxed and low-maintenance, but at the same time not wedded to an annoying style! Who didn’t require you to spend half your time figuring out how to squeeze variables into ill-fitting matrix containers so you could run things in a vectorized way! Things seemed so easy with Python! Oh, sure, we had a little spat about shallow copying vs. aliasing, but once we got that ironed out things were just blissful.

And yet ML and I are still together, even though I’m now infatuated with Python. I just can’t cut the ties totally with ML – I’ve got a project where ML is necessary, you know how it is… its friends are my project managers, and all that… and it is really good at plotting, I’ll give it that. And gosh, it has been ten years… you know, that’s a significant part of my life invested in ML!

What should I do? (Okay, that was tongue in cheek. I couldn’t resist the end of the relationship analogy. What I’ll do is finish up my project with the PM who really wants me to use Matlab and then use Python for the one that I am managing. And… okay… maybe keep Matlab around for plotting things quickly and for two-line quick things.)

In my experience, MATLAB is used by non-programmers to write convoluted code. They like it because instead of writing a sort algorithm, there is already one included. The matrices or whatever they’re called are cool, but other things annoy me. User-friendliness is limited; I’ve gotten error messages which basically say “something is wrong!” or show me the long syntax of a command without explaining how it works or how to interpret their symbols.

MATLAB is quickly becoming the standard in my industry, so I don’t have much choice. I still stick with VB.NET for primary programming though.

Whew, I’m just glad it was your relationship with Matlab and not your hubby!

Best OP of the month! :stuck_out_tongue:

I expected this to be about a nerd who modeled a rl relationship using MATLAB. I am disappoint.

Yeah. It’s like the whole concept of debugging was some sort of afterthought for them. (I suppose it probably was.) And yes, I first started using it when I was doing a lot of matrix calculations, for which MATLAB is ideal. But I don’t do so much of those, anymore, and you know… python has a sort algorithm too!

The final straw was when I tried to implement a red-black tree in MATLAB. It… is not a good language to implement trees in.

Aw, thanks!

Heh – now, that would be something. I want to read that post too.

I’m disappointed as well – where are all the people coming out of the woodwork telling me to dump the loser? And that the common factor in my dysfunctional language relationships is me? And so on?

You leave her alone! Perl’s mine! MIIIIIIIIIIIIIIIIIINNNNNEEE!!!

-DTMFLanguage now!
-Can’t you see he’s just USING you!?
-Your needs are not being met.
-He sounds like a rapist.
-S/he is cheating on you. Run away!
-(For women) Have you thought about your relationship with your father and how his cycle of abuse has led you to another abuser?
-(For men) Have you thought about your relationship with your mother and how her nagging and whining has led you to feed the crazy?
-Have you thought about counseling?
-You are too far gone for counseling!
-Have you thought about depression?
-You are severely depressed!

I think that covers nearly everything :wink:

As Dear Abby (the original) would ask, “Would you be better off with or without ML?” You have to be honest with yourself and look firmly to the future, the past cannot be changed, and shouldn’t be allowed to anchor you in a dysfunctional relationship. I have always found programs to be rigid. I MUST BE ALLOWED TO GROW! Even if that means leaving ML’s dysfunctional ass behind.

Yeah, this is more like what I was expecting from the Dope! :wink:

lindsaybluth, for some reason MATLAB doesn’t seem open to the idea of counseling :wink: But I still think we can make this work!!!

literalists, but we have so much hiiiiiistory! And I know… deep inside… MATLAB is really a good language… well, for matrices… Which I don’t really use anymore… and in my current job I almost never do… but maybe I will again someday!!

After spending all day with MATLAB, I sometimes wonder if isn’t running so slow just to keep me around longer. In the middle of a project I often find myself wondering why I didn’t hook up with a real language, but MATLAB is so familiar and tempting at the start of the project that I forget how badly it always ends.

But don’t forget the good things!
MATLAB is so dynamic! Sure, it’s slower, but those compiled languages just don’t have the same energy. Besides, this time might be different!
With MATLAB you are never treated like an object. Instead, it sees the entire array of your personality.
If you are first with MATLAB, it tells you you are number 1! Other languages treat you like a zero.
MATLAB was there for you when you were an undergrad who didn’t care about code structure or speed. Maybe it encouraged some bad habits, but you were the one who wanted to cut to the drinking.

Also, your license cost some thousands of dollars, so it must be good. Other languages are cheap, they just don’t take care of themselves.

nolonger lurking, yeah!! You get our relationship! Yeah, this time might be different!! …or not.

Your entire post was great, but these made me laugh especially hard.

What does it say about me that I just want a language that will let me start at zero?