Here at the MathWorks, one of our Core Values is Continuous Improvement. Part of that is about being process oriented- “Clock building is better than time telling.”
Following that Core Value to talk about algorithm development, it takes more than just looking at finished algorithms (time telling), you need to look at the process of algorithm development (clock building). In that spirit, I wanted to present a new video where I spend fifteen minutes in MATLAB developing an algorithm. You will see every line of code as it is written (and rewritten). Along the way, you will see:
Short description of the algorithm to develop
Creation and exploration of a test case
Initial creation and reworking of the variable naming convention to avoid using “magic numbers”
Intermediate testing of algorithm
Keeping code clean and readable
Use of debugger to understand error messages
Use of visualization techniques to understand output
Effective use of MATLAB desktop tools
While the topic of the movie is an interesting little algorithm about fractals, the video is more about the process of programming in MATLAB.
Doug,
Can you please post the video in another format, say Windows Media? I am unable to view the shock wave format and currently has new program install constraints on my PC.
I find it re-assuring to be reminded that everyone has to start from scratch for some things, and that trials are endured by all.
I do however, find it annoying that MATLAB error messages are still so very cryptic. We really shouldn’t have to enter debug mode to figure out why the subscripted dimension assignment was mismatched. Are we holding on to these messages for the sake of compatibility? Maybe a better message would be “expected matrix output not compatible with matrix element assignment”. Sure, that’s confusing too, but at least the person reading the error would see the red flag “matrix output” and recognize what he was doing.
And while I’m on my soap box, can we have line numbers for errors thrown when running code in cell mode? How about printing values of loop control variables when errors are thrown from nested loops? I realize there are alternatives, and this may not be the best place to voice my concerns…just sayin’! Seems like these problems would greatly impact the productivity of many, if not all MATLAB users.
Andrew
[keyboard mishap edited as per Andrews note- Doug]
Doug,
I’ve tried to view this with several different programs on my Powerbook. Each fails in its own way. Could please you post it on youtube as you have some earlier videos.
Thanks,
Roy
This was taken at a much higher resolution, it will not fit on YouTube. Sorry, this is the first report of not being able to view the video, anyone else seeing problems?
Doug,
Can you please post the video in another format, say Windows Media? I am unable to view the shock wave format and currently has new program install constraints on my PC.
Thanks,
Brian.
Brian,
Sure thing. I just updated the zip file to include the .WMV you requested.
Doug
I find it re-assuring to be reminded that everyone has to start from scratch for some things, and that trials are endured by all.
I do however, find it annoying that MATLAB error messages are still so very cryptic. We really shouldn’t have to enter debug mode to figure out why the subscripted dimension assignment was mismatched. Are we holding on to these messages for the sake of compatibility? Maybe a better message would be “expected matrix output not compatible with matrix element assignment”. Sure, that’s confusing too, but at least the person reading the error would see the red flag “matrix output” and recognize what he was doing.
And while I’m on my soap box, can we have line numbers for errors thrown when running code in cell mode? How about printing values of loop control variables when errors are thrown from nested loops? I realize there are alternatives, and this may not be the best place to voice my concerns…just sayin’! Seems like these problems would greatly impact the productivity of many, if not all MATLAB users.
Andrew
[keyboard mishap edited as per Andrews note- Doug]
Doug,
I’ve tried to view this with several different programs on my Powerbook. Each fails in its own way. Could please you post it on youtube as you have some earlier videos.
Thanks,
Roy
Roy,
This was taken at a much higher resolution, it will not fit on YouTube. Sorry, this is the first report of not being able to view the video, anyone else seeing problems?
Doug
I just changed the resolution and made it in-line. All should be well now.
Enjoy,
Doug