Geoff,

Great question. I will answer briefly but this question may be more
on-topic in chat, although reading the guidelines[1] your question is
relevant to your learning or programming in J, so I'll give it a shot.

To answer your question, I need to provide some structure to my
response. "How fast is it to code once you are experienced?" is a
fairly vague question, so allow me to answer a restated version "How
suitable is J for making it to the leaderboard on adventofcode?". Even
more generally, I think we need to align on the definition of coding
or what it means "to code". To code, one must understand the problem,
think of a solution, implement the solution and verify the solution.
Each of these activities have layers to them.

My experience has been that I can recognize and understand certain
types of problems faster now that I have some experience with J. Some
aspects of the problem definition can almost be read and internalized
as J - somewhat like how I've heard people can think in foreign
languages. It also helps that there is fairly large body of examples
and documentation that can be pulled from mentally as one starts to
read a problem. The mind can suggest that "this sounds like something
I've solved or read about before"

J's notation helps me think of a solution faster than most other
languages. Once the problem is understood, the solution can sometimes
be thought of as almost a translation of the problem. If you want to
go deeper on this topic, I would suggest reading
http://www.jsoftware.com/papers/tot.htm and this recent thread also
came to mind (many others I'm sure):
http://www.jsoftware.com/pipermail/chat/2015-July/006706.html


Implementing the solution comes quickly with J as the mental solution
can often be expressed compactly in J. Iterating though attempts at
solutions is also fast in J because there's less code to throw away
and retype

Verifying the solution is fast because of the interactive environment
and how easy it is to verify individual parts of statements - a
benefit of writing functional code

So to summarize, I think J is well suited to be a language for making
it to the leaderboard. Looking back through the times of various
problems, I think I could have made it towards the bottom of the
leaderboard at least a few times, but alas I'm on eastern time so I'm
not staying up til 1am to work on a problem. Ultimately, "how fast is
J to code" depends on the type of problem you are solving. J is
well-suited for many types of problems and therefore solutions can be
fast to code.

Thanks for asking


[1] - http://code.jsoftware.com/wiki/System/Forums

On Tue, Dec 15, 2015 at 9:30 AM, Geoff Canyon <[email protected]> wrote:
> I'm curious how fast J is to write for someone who knows what they're
> doing?
>
> In AdventOfCode only the first 100 submissions make the leaderboard, so
> speed is a premium. I dabble in J, but I'm *far* more comfortable in
> LiveCode, and that's what I use for AdventOfCode, although I sometimes go
> back and re-solve in J later.
>
> So I'm just wondering: J is remarkably powerful and compact, but how fast
> is it to code once you are experienced?
> ----------------------------------------------------------------------
> 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