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: Juan Pablo Carbajal
Subject: Re: Octave and cargo cult programmingHello
Date: Fri, 14 Sep 2012 00:04:12 +0200

On Thu, Sep 13, 2012 at 11:54 PM, Sergei Steshenko <address@hidden> wrote:
>>________________________________
>> From: Judd Storrs <address@hidden>
>>To: Sergei Steshenko <address@hidden>
>>Cc: Octave users list <address@hidden>
>>Sent: Friday, September 14, 2012 12:27 AM
>>Subject: Re: Octave and cargo cult programmingHello
>>
>>
>>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
>>
>
>
> This whole broadcast thing is a _great_ nuisance for me.
>
> _Nowhere_ in my scripts I care about row <-> column vector, but with 
> broadcasting ON by default Octave starts issuing warnings in case I confuse 
> row <-> column vector.
>
>
> The warning is utterly _stupid_ - it doesn't tell me what the line number is; 
> instead, Octave starts doing all this broadcasting bullshit often causing 
> memory overflow.
>
>
> A much more useful thing would be to implement universal vector and 
> compatible operations, i.e. a vector which is neither row nor column - a 1d 
> array in simple programming English.
>
>
>
> So, because the warning does not tell me what the line number, but error 
> luckily does, I rely fundamentally everywhere on this error.
>
>
>
> Regards,
>   Sergei.
>
>
>
>
>
>
>
>>
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://mailman.cae.wisc.edu/listinfo/help-octave

This issue was discussed at length in this mailing list and the IRC.
I find broadcasting a very useful addition to octave.

1d array in simple English (you like lisp, they are called lists
there!) might be ok, but I prefer some linear algebra language around
here where x' and x are different, and of course a huge community of
scientist talking the same language too. You should try it!

@Sergei: Why do you always assault us? If you can do better, just go
on and do it. If not, please, be polite in your posts.

-- 
M. Sc. Juan Pablo Carbajal
-----
PhD Student
University of Zürich
http://ailab.ifi.uzh.ch/carbajal/


reply via email to

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