When people comment dumb things on the live streams, e.g. "I really wish Mathematica could have keyword arguments like python does", I wonder if it is their fault for not reading the documentation before complaining or if it's WRI's fault for not making the design of the language more obvious in their tutorials and documentation...
Maybe if I used it at work it would have come up more, but just as a hobbyist not creating anything of value or code for anybody else to consume, it's never been a thing I needed to do
I think once you get used to the pattern it's natural, too
I wrote a thing to generate a color scheme picker interface thing earlier today and ended up specifying a lot of things as Options because I was gonna forget my argument ordering, I knew, even though there were only four args
I guess I very rarely set out to write a comprehensive batch of code that will do a job. Normally I set out to learn something about something, or I have a goal in mind (can I find where this image was taken?). None of it's ever meant to reusable
(To be clear, in WL only. To any prospective employers reading, I am a good boy in other languages)
I'm getting a "non-atomic expression" error (select::normal)
I'm not asking for a solution of the specific problem, but what the hell do I do when I'm getting this kind of error?
There is nothing on the web that gives a systemic overview of what the next step is. I've been printing various variables but everything is giving the expected result and the required input for my function
Initial research appears to suggest it's an evaluation control thing
@1010011010 First step for me is normally to hope that there is a usable stack-trace attached to the message (click on the ... button). That, together with the documentation page (again, if there is one) usually gives you a pretty good idea of what and where the problem is. In your case, try to identify the Select command issuing the message and look at the second argument.
@b3m2a1 Yes, that's what I meant to say, thanks! - I somehow seem to always think about the operator forms (as in Select[crit][expr]), which severely messes up my ability to count arguments...
Something kind of fun, if you do a mild edit to FrontEnd`Private`SwitchContextB you can make the FE's context-switching mechanism give you and $ContextPath you desire.
To prototype this I made things like: "ab`\[Bullet]ba`\[Bullet]ba`b`"; turn into {"ab`", "ba`", "ba`b`"}
Obviously anything could work in the place of \[Bullet]