News for hackers. Stuff that matters.
Re:Accused murderer wins right to check source code of DNA t... by knolan on Monday February 08, 2021 @03:50PM (#26069924)
170,000 lines of Matlab code for a project is not a good sign. Unless they’re also including the source of various Matlab toolboxes which are already tested by the Mathworks.

It’s such a high-level language it’s hard to imagine what the hell they’re doing with all that code. It’s probably mostly useless cruft from GUIDE.

Re:Accused murderer wins right to check source code of DNA t... by sdenton4 on Monday February 08, 2021 @05:28PM (#26071133)
My guess is a bit of each: The company high-balling the LoC estimate to try to impress/scare the judge, but prooobably also has a truly terrible codebase.
Re:Accused murderer wins right to check source code of DNA t... by breischl on Monday February 08, 2021 @06:47PM (#26071970)
How that number was probably arrived at...

PHB: Hey, how many lines of code do we have? CodeMonkey: You want a high estimate or a low estimate? PHB: High CodeMonkey: Well, including unit tests, comments, whitespace, build scripts, integration test harness... 170k

At least I hope they have enough testing code to be signficant...

Re:Accused murderer wins right to check source code of DNA t... by h0l0cube on Monday February 08, 2021 @07:27PM (#26072308)
Having seen Matlab code that's been exported to C, it's mostly bloated by static arrays, and there's quite a lot of redundant functions. So maybe the LOC count is from a C export?
Re:Accused murderer wins right to check source code of DNA t... by willis936 on Monday February 08, 2021 @08:35PM (#26072775)
I’ve made 4 decent sized gui based tools before. I would never use GUIDE. At minimum it uses eval.

If you want a terrible gui-based gui creation interface: labview awaits.

Re:Accused murderer wins right to check source code of DNA t... by knolan on Tuesday February 09, 2021 @09:24AM (#26077783)
I compiled eval once for fun.
Re:Accused murderer wins right to check source code of DNA t... by willis936 on Tuesday February 09, 2021 @11:11AM (#26079164)
A friend of mine did that. They were able to run arbitrary .m files from an executable. As far as I know, this doesn't violate any terms of use. I wonder what keeps someone from just downloading the freely available MATLAB runtime and running a compiled eval wrapper and suddenly have a freely available version of MATLAB.

Also just because eval can be compiled doesn't mean it should. It will forever be a security risk and I will not write code that uses it in good conscious. Fortunately, Mathworks has provided good alternatives. My personal favorite has been variable field names. It really opens up a lot of elegant coding.

https://www.mathworks.com/help/matlab/matlab_prog/string-eva...