help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Octave and cargo cult programmingHello


From: Judd Storrs
Subject: Re: Octave and cargo cult programmingHello
Date: Thu, 13 Sep 2012 17:27:56 -0400

On Thu, Sep 13, 2012 at 4:57 PM, Sergei Steshenko <address@hidden> wrote:
Hello,

after learning how and why broadcasting was introduced into Octave I stumbled upon the following article:

https://en.wikipedia.org/wiki/Cargo_cult_programming
.

The proper way of introducing broadcasting should have been through compiler pragma or explicit user controllable (and off by default) operator overloading.

Now into each of my scripts I insert

warning ("error", "Octave:broadcast");

- I don't like startup files - because of their global nature.

It's funny because I finally gave up and just put

    warning ( "off", "Octave:broadcast" ) ;

in my global .octaverc because I've grown so tired of typing it in each and every one of my scripts. I find my code is much denser and more direct now that it's not littered with obnoxious bsxfun() calls everywhere.

Have you run into a situation where you *rely* on the error? Can you elaborate?


--judd

reply via email to

[Prev in Thread] Current Thread [Next in Thread]