« SQL Server 2008: Day 2 | Main | SQL Server 2008: Day 5 »
Mythological reputations
By insanity | August 13, 2008
I’ve had a hell of a month. I have been spending most of this year so far working with a large expensive piece of software called MATLAB. By expensive, I mean the student version is over $100 for the most basic package. By expensive, I mean the research package starts at $1000 and climbs somewhat exponentially.
The last month has led me consider how I got into this predicament, that is, one of programming for MATLAB. You see, MATLAB is the foundation stone of all computer-based maths. IT is the yard-stick against which all other pieces of software are measured against. Why? Because.
Here are the key reasons I’ve been told for using MATLAB:
- It can do EVERYTHING (almost)
- It has years of expertise behind it
- It is expensive, therefore it is high quality
- Everyone else recommends it…
The problem is… my experiences don’t reflect any of the apparent positives that have been dictated. To give some background, I am currently doing some image processing of video feeds in an exercise in computer vision. So far I have had the following issues:
- Video under linux can only be loaded if the video is stored as a non-interleaved AVI file. Finding a program that can do this seems to be about as likely as finding a hen with dracula-fangs
- Object-orientation can be done in two different ways. Only one method is properly documented by MATLAB. Neither way work as one might expect.
- MATLAB provides extraordinarily clumsy controls for GUI and redrawing operations
- Image processing of various kinds has some strange undocumented limitations. For example, I load a 2D image, the instant I attempt to change perspective (camdolly etc.), the image vanishes…
- Image crop can only crop a straight rectangle…
Each of these has wasted more than a day of work to figure out and program around. So where is the advantage here for using to MATLAB? I have explained these shortcomings to others who I work with, and all I ever hear back is the popular refrain “but the program is really good… what’s your problem?”. So, in spite of all these shortcomings and issues, when I say MATLAB sucks, people just don’t believe me.
The first major question to consider is: how did MATLAB come to be in such an untouchable position?
As ever, I dont like to present problems without having theories to back them up. My theory is it took the following 4 steps:
Step 1: write a program
Simple stuff of course. They wrote a mathematics program that could work in matricies. It was written as an educational tool by a lecturer. Nothing wrong at this point.
Step 2: sell the program to another university
So, this is the first and only software of its time. Of course other Uni’s have the same desires and needs, so they adopt it wholesale, as it is a lot better than nothing… right? Now we are starting to get on shaky ground, as this program likely hasn’t really been very “cleaned up”.
Step 3: get adopted by a company
This happened in 1984, with the forming of a company called The MathWorks. Now there is a commercial reason to sell it… and generally the commercial entity will want a bigger market etc. Also, the commercial entity will want to sell asap, and probably won’t bother rewriting or reworking the existing system. After all, additional functionality expands the market-base, not improving of existing technology. So, we get a different style of programming tacked onto an already questionable code base.
Step 4: get many students hooked on it so it gets dragged out into the industry
If the students are raised on only one program, then of course, that is what they will want when they graduate. A great business model, I would highly recommend this track if you can get in! Now the software is suddenly being used everywhere. It is quite prolific, and is an almost entirely self-supporting illusion. All you really need is enough people coming in to equal the number of people leaving your software. At uni, this happens very naturally, so there is no hassle. Industries will use software students are familiar with (or students will ask for software they are familiar with), our recent graduates won’t really investigate the other alternatives that hard, assuming that the university had already done this research (they didnt either)… suddenly we have a mythical reputation that springs into action. All sides assume that MATLAB is the best of breed… why? Because umm… everyone else is using it…
The problem is, that no where along the way has anyone actually sat down to decide the program they are building. MATLAB has grown organically for many many decades now and my… goodness… does it show. It has many different styles of documentation, mutliple functions to achieve almost identical ends, inconsistent coding syntax and many undocumented “features”. And yet, this has no effect on the perceived value.
MATLAB is already big. Why is it big? Because it grew when no-one else was there to compete. So people argue “but <prestigious uni name here> uses it, certainly its good enough for us!”… of course that Uni uses, they use it because everybody else does!
Is MATLAB the best peice of software? Probably, it is very expensive… and everyone knows you pay for quality.
Why is MATLAB so expensive? Because it has taken decades of development, therefore it must be good… you know, it’s passed the test of time and all.
The reaction people are having to my critisisms is quite basic: they are buying the advertising material. It is the same reaction you would get if you rocked up in a Ferrarri, and started telling everybody how bad the performance was. People would nod and smile knowingly, and think in the back of their head “but its a Ferrarri… I’ll be he’s just using it wrong”.
Well, I’m not using it wrong. For the area of image research I’m doing, contrary to popular belief, MATLAB quite simply sucks. If there is one thing I can ask people reading this, it is: Please please please DO YOU OWN RESEARCH before you force those working below you to use a particular technology or software suite. If you haven’t checked that the software can do the hardest thing you will need to do (or even all the simple things such as maybe loading a compressed avi file), then you haven’t done your research properly and could be crippling your project for life.
So next time someone says you should use <Big Technology Company Name Here>’s brand spanking new product, smile at them, pat them on the head, find yourself a trial copy and check it out for yourself before you commit to using it. Don’t be fooled by the myths of reputation.
Topics: Blind-leading-blind, Hype, Management, Programming | 9 Comments »
August 13th, 2008 at 9:59 pm
My god, so much of that reminds me of Javascript, haha. And also much of it is in line with the tool we use. Ours is over 20 years old as well, and originally there was absolutally nothing in the market. Hell, this pre-dates BASIC.
As I mentioned the other day, I almost took a job progamming in Matlab. I’m even more glad I didn’t now.
August 13th, 2008 at 10:17 pm
Javascript at least is growing up and progressing… even if it is encouraging a whole different style of web abuse
But there is many other technologies that sit in this category. Has anyone ever heard of “Blackboard”? A total steaming pile of inconvenience, yet they have huge market share in Uni’s. We can also deal with Novell (getting better at least)… the history of computers are inundated with these mediocre companies.
I might write another post about this effect more in detail sometime…
August 16th, 2008 at 10:17 pm
Blackboard’s getting an upgrade… I’ve heard it’s rumoured to be called “WhiteBoard”
October 18th, 2008 at 4:33 am
I’m currently required to “learn” Matlab as an engineering student and I kind of had the same type of thought. I, however did not even know of Matlab until a year or two ago. They have decided we should teach ourselves to use it too. I think the program is a joke. I know the C programming language and though it’s more time consuming and ancient I still like it better than Matlab.
November 18th, 2009 at 1:25 am
Thanks for making this post! Can you tell me more about what you meant when you said, “Object-orientation can be done in two different ways. Only one method is properly documented by MATLAB. Neither way work as one might expect.” Specificially, what about the “properly documented” method doesn’t do what you expect?
November 18th, 2009 at 6:04 pm
Hi Rachel,
Welcome to the blog
. I must warn you initially that it has been well over 12 months since I last used Matlab, so my exact arguments are slightly reverse engineered from my code comments of yester-year
My primary difficulty with Matlab’s OO implementation was that there are two styles of OO for consideration, but the syntax for each felt a little different. And both of these deviated significantly from how most other languages work (e.g., java c#).
One specific example is how to update a property on an object inside a function. In java, the code is:
class ExampleClass {
private int testprop = 3;
public void example() {
testprop = 4;
}
}
obj1 = new ExampleClass();
obj1.example(); // obj1.testprop now returns 4
In matlab, the code looks like:
classdef ExampleClass
properties
testprop = 3
end
methods
function self = example(self)
self.testprop = 4
end
end
end
So to instantiate and call this class, I would do:
obj1 = ExampleClass()
example(obj1) // obj1.testprop still returns 3
obj1 = example(obj1) // obj1.testprop now returns 4
I struggled when reading the documentation as it is not made explicit how this example function works (that is, the self passed into the example method, vs self assigned as an output variable). Using this class also requires re-assigning to a variable, something Java did not.
The requirements for re-assigning the object back to the handle was not well conveyed in the documentation I read. Many of the examples give on MATLAB on their site and manual don’t show a simple overview that exercises some of this basic functionality. And coming from a java background, the behaviour is significantly different such that I wouldn’t have anticipated it (so definitely part of my original gripe would have been “it’s not like java/python/c#/other mainstream OO languages I’ve used”
).
The other difficulty I had was with defining a class inside a file, vs usage of an @ directory. I could find little documentation explaining clearly the differences between the two approaches , or how to even use the @ format. In the end I went with defining the class inside a single file, as I could not tell whether path searching etc. was failing, or whether I was simply using bad syntax when dealing with the @ format.
Final summary was I found MATLAB OO to lack simple, concise examples showing and explaining how the features work in a quick overview. Coming from other OO languages, I was semi-forced to wade through documentation that mixed both introduction to OO, and actual syntax used, often with some of the more obtuse details (such as needing to re-assign to a variable) not well explained or clearly demonstrated. Perhaps something like this could be greatly clarified by contrasting/comparing with a well-known language such as Java. That is, demonstrate a class written in java, and then the equivalent written in MATLAB script within a single file, and the equivalent using the @ format.
November 19th, 2009 at 12:12 am
Yeah, you make some really good points. Making the transition from other OO languages to MATLAB OO definitely requires some adjustment. Thanks for providing these specific examples!
November 19th, 2009 at 7:28 am
A company that seeks feedback is definitely worthwhile… I hope I’ve been able to provide some useful thoughts
November 19th, 2009 at 8:06 am
Definitely, you have! If you’re willing to chat, I’d love to get more details on what you were trying to do and where MATLAB didn’t support what you needed. Can you see the email address I used to submit my comments?