
APL Style: Patterns/Anti-patterns - telotortium
https://sway.com/b1pRwmzuGjqB30On
======
geocar
I love this bit:

 _Readability is the amount of money you 're willing to bet that a change you
make to the code will work the first time, without breaking anything, without
testing it mechanically first._

~~~
jknoepfler
It's clever, but I think it misses the point of readability. For me anyway,
readability isn't about one person actively developing code. It's about
communicable code, working in a shared code base, and having to re-skim a
2,000 line chunk of a 2 million line code base two years after dropping it on
the floor in order to update it in a timely and correct fashion.

In the same fashion, I update my design, architecture, and implementation
documents concurrently with implementing a prototype if I need to make
modifications or add complexity on the fly. They aren't for me, now. They're
for the junior engineers I'm going to hand the project over to who need to be
able to flesh out parts of a much larger machine.

Finally, whether or not I can read or understand my code, which I generally
can, I test it anyway. I test my code not because it is unreadable (it is
generally very readable), but because despite my best efforts to minimize
complexity, it is generally too complex to fit inside my head, and because
whether or not it fits in my head I'm not the only person working on it.

~~~
geocar
I believe people have strong feelings about what is readable and what is not.

Most people have this subjective definition of "readable" which is basically
something between "I can read it" and "people I work with/like can read it".

This definition is difficult to work with for a number of reasons, but if you
are trying to convince someone there's value in reading and writing code
sufficiently alien, it's at a minimum a massive barrier to progress.

Disclaimer: I can read code like this, and while I've let Aaron try to teach
me Tai Chi, I don't use Dyalog or co-dfns.

------
ognyankulev
Two talks with these slides:

1\.
[https://www.youtube.com/watch?v=9xCJ3BCIudI](https://www.youtube.com/watch?v=9xCJ3BCIudI)
(Dyalog17: Patterns and Anti-patterns in APL: Escaping the Beginner's Plateau)

2\.
[https://www.youtube.com/watch?v=v7Mt0GYHU9A](https://www.youtube.com/watch?v=v7Mt0GYHU9A)
(Design Patterns vs Anti pattern in APL by Aaron W Hsu at FnConf17)

------
telotortium
Quite an interesting presentation, but the site is pretty slow, especially
with the transitions. I would click on the three dots on the first slide and
export it to PDF to read it.

------
galfarragem
Noob questions:

\- Did anybody try to use APL (or a derivate) in web development?

\- Is the APL job market under-saturated? Or putting it in a different form:
is there job opportunities for the 'average Joe'?

I hate verbose, or better, I hate to be distracted by it.

~~~
35bge57dtjku
> Did anybody try to use APL (or a derivate) in web development?

I'd love to see how it handles web dev. It doesn't look like it'd be good at
those types of things.

~~~
Volt
Check this out: [https://miserver.dyalog.com](https://miserver.dyalog.com)

------
M_Bakhtiari
With the view of APL as a better notation for mathematics, what would happen
if mathematics were taught using APL from first grade?

In first grade it would probably be identical to traditional notation, and you
wouldn't need a computer because learning to evaluate by hand would be the
whole point. Then as more operators are added it's a convenient way to not
have to worry about operator precedence. And in higher grades where
programming classes are increasingly being mandated (despite there being next
to no teachers capable of teaching it) they would have already picked up
enough of APL to get it for free, making it a mere typing exercise to put it
into the computer for execution.

------
ekns
I've never really like the word "anti-pattern". Anti-patterns are still
patterns of sorts instead of pure entropy.

How about just "common mistakes" or "discouraged/deprecated/error-
prone/incorrect patterns" or something?

~~~
talideon
That's a common usage of the prefix 'anti-', however. You see it in things
like antihero (still a hero), antiparticle (still particle), &c., where it
means 'opposite, contrasting with the norm'.

~~~
paulddraper
Or antithesis (still a thesis).

Anti just means "against". The opponent could also fit the suffix (antithesis)
or not (antisocial).

Contrast with "non" or "a" or "un'.

------
bringtheaction
There is a notification about cookies that has no link to dismiss it, which
obscures the content on iOS.

------
sciolizer
If I wanted to gain a more intuitive appreciation of the patterns described in
the presentation by learning a language, which is the best place to start:
APL, J, K, or something else?

~~~
alsoconfuzed
The only way to truly understand an APL derivative language is to implement an
interpreter for one.

It's interesting that the author of the article embraces the Write Only code
philosophy. If there's an issue - just rewrite it.

------
agumonkey
does sway offer pdf export u_u ?

~~~
dasmoth
Mercifully, yes!

Click the “three dots” icon in the top right and it should be obvious from
there.

(The “accessibility view”, accessed in the same place, is also worth a try)

~~~
agumonkey
Thank you very very many much

ps: this might only work for a while but here's an url

[https://sway.com/s/b1pRwmzuGjqB30On/exportstoryget?fileType=...](https://sway.com/s/b1pRwmzuGjqB30On/exportstoryget?fileType=1&outputType=0&etag=0x8D581ABC05DD141&cacheVersion=3&filename=Sway.pdf)

------
jochung
In the FP community there is often griping about obtuse mathematical
terminology. APL seems like an alternative answer that embraces the
unsuitability of human language to capture the nuances of composability space
and just presents an alien language instead.

It's not about the code, it's about transforming between different shapes of
information. I suspect this requires a degree of kinesthetic thinking that
most people do not have, similar to the phenomenon of aphantasia. Linear, word
based thinking is not the best for everyone, and for those averse to it,
there's APL.

~~~
seanmcdirmid
For problems that are about transforming different shapes of information, APL
makes sense. However, it isn’t so much about the programmer, but the problem
domain.

~~~
virgilp
What problems are not about that?

~~~
seanmcdirmid
Plenty of programming problems are non-transformative, anything interactive
for one. If you want to see attempts to make it transformative, there is pure
FRP (not the fake kind, see Antony's Courtney's dissertation as a good example
of how weird this looks at an extreme) and lenses. In either case, it feels
like trying to shoe horn one solution to a problem into the wrong kind of
abstraction. Much of the today's web work is also non-transformative.

~~~
virgilp
> anything interactive for one

I feel there's a misunderstanding in how you use "non-transformative" versus
how I interpret it. E.g. aren't interactive charts mostly about
transformations? (data => aggregation => affine transforms => render the
graphics)

~~~
seanmcdirmid
Mostly? Maybe, maybe not. Every program has transformational elements, but
they may or may not dominate. A rendering pipeline is, but if you are
implementing a text editor, you might not be doing many transformations at
all.

------
moontear
OT, but this is the first time I have seen someone use Sway outside of
Microsoft. Is Sway popular in APL circles?

