5 ms·
I have worked with MATLAB code with 20,000 lines of code. Only over the past years, OOP and unit-testing has become properly available and usable. My guess is t
by pvitz 6y ago
I have worked with MATLAB code with 20,000 lines of code. Only over the past years, OOP and unit-testing has become properly available and usable. My guess is that this 170,000 lines are written in the old procedural way (also for performance reasons) and are full of bugs, also thanks to the lack of supporting tools.
Most likely, this grew out of a research prototype that just worked too well to be reimplemented in a proper production environment.
- fatnoah 6y agoI wonder if bug tracker and other reports would be part of discovery in this case.
- pvitz 6y agoEqually interesting is in my opinion who should do the review. Mathworks' own consulting service is probably the best to do so, but I wonder if they would objectively work against one of their own customers.
- fatnoah 6y agoYeah, any technical expert in a trial concerns me. I was an alternate juror (meaning I had to sit through the trial but was not allowed to take part in any deliberations) in a trial that involved the testimony of a computer "expert". The expert's testimony was 100% true and appeared to definitely prove X to someone who knew nothing about the subject matter. It was things analogous to saying the system was secure because it had a security chip. There were 1,000,000 questions I wished had been asked.
- mattkrause 6y agoMatlab has had classes (both types!) for ages. The unit-testing stuff dates back to at least 2013, and there were toolboxes to do similar things even before that. The language certainly has some warts, but IMO, the bigger problem is that it's usually learned/used in contexts that focus on code quality: the goal is the resulting number or plot rather than the software that generates them.
- pvitz 6y agoThat's why I wrote "available and usable". What Mathworks called unit-testing back then was laughable. It only got interesting in the past two-three years. Same with OOP and the features added in the past years (e.g. type hinting etc.) You can see that Mathworks themselves preferred not to use OOP in their own toolboxes. Parts of the Financial toolbox use it (e.g. the SDE stuff) or the datafeed toolbox, but much stuff is still written the old way. Another example would be Appdesigner as the new preferred way of writing GUIs with OOP. It is still much slower than the old GUIDE functions.