I do not have a problem with characterizing this as cargo cult programming.

But that does not necessarily mean that cargo cult programming is
always a bad idea.

The thing to keep in mind is that the numbers represent different
things in different contexts.

Also:

   $ 4 u: N
57
   $ N { a.
57
   3!:0] 4 u: N
131072
   3!:0] N { a.
2

The contexts are different.

So that is why 4 u: N looks different from N { a. even though they are
based on the same numbers, are both literal data and have the same
length.

And that is, I imagine, why it feels like cargo cult programming. The
significance of literals is somewhat arbitrary.

When dealing with arbitrariness, the cargo cult approach can easily be
the most rational approach.

Thanks,

-- 
Raul


On Wed, Sep 10, 2014 at 3:27 PM, Dan Bron <[email protected]> wrote:
> Raul:
>>  So I should have used 3 u: 7 u: instead of using 3 u: directly.
>
> To be honest, 3 u: 7 u: is an example of me practicing cargo cult
> programming.  It's worked before, and the results in this case were saner
> than any other combination u: function codes.  But I wouldn't be
> comfortable justifying the code in front of a jury of my peers.
>
> Most of this is due to my ignorance (about Unicode and character
> encodings), and most of my ignorance is due to a lack of motivation to
> learn about (about Unicode and character encodings), and most of that can
> be written off as a coddled, parochial, American (i.e. ASCII) situation.
>
> -Dan
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to