Suggestion for using Word Search as a basis for Julia coding practices

Hello there.

Although discourse is rich with excellent approach discussions I would suggest it might be interesting to have a GENERAL goal which could address many of the areas that interest people.

My suggestion is to use the Word search application. It could serve as a basis for newcomers to begin to understand Julia with a problem we all can relate to.

You need to address data management:
the letter structure ( 2d ( square) 3d ( cube))
the sought words which can be static or dynamic
the found words which are discovered ( 3d)
interesting emergent relationships and representation of same.

You need to consider efficiency:
how effective is the manner in which you allow participants to interact. How easy is it to populate the structures needed
how quickly can you find the words, how can it be seen to be more efficient using later releases of Julia or more effective algorithms.
can you find new relationships and if so how?

It would serve as a mechanism for teaching and discovery. It would serve as discussion tool for new approaches in a fun and interesting manner.

So it would end up as a 'sticky" topic where people would contribute their solutions to any of the challenges presented.

I’m afraid I don’t follow. What’s the suggestion?

5 Likes

I believe OP’s intent is to use this as the canonical example of writing and optimizing Julia code. In general, I think the word “approach” is being used to refer to a mixture of design and implementation, so that this problem would admit of several “approaches”, each of which teach how design and implementation choices affect performance.

I, for one, am a big believer that having one very deep example with hundreds of variations is a great way to learn about writing code, so if OP pushed on this I think it would be a great win for the community. On the flip side, I think it’s likely not what people coming to a forum are looking for; people asking about performance optimizations usually do truly want those optimizations to be applied to their own code rather than to a community-maintained program.

@johnmyleswhite has it spot on. A word search to show examples of best practices. How to document, code layout, modules, functions the whole 9 yards. I find that a good, as defined by the feedback from the forum, would help tremendously. Especially if many people put up examples.
This would target people looking for examples to quote in their answers, new to julia and learning in general. Might even serve as a benchmark. I think people come to forums for many reasons and the most interesting ones, I think, are stimulation and education. Having a specific example that is common to most would serve a larger population than just a math or stats problem.

Base, the standard libraries, and a lot of mature packages are already good examples for these things. And, of course, all of these things are documented.

I am skeptical about authoring code (that does not yet exist) solely for demonstrating some style. Code that is not useful because of its functionality always ends up unmaintained eventually.

2 Likes

all fair points:
1 the code doesn’t currently exist because it’s a form of challenge. Many people MIGHT attempt it and from those attempts ALL will learn. A bad example of code is a good example of what not to do.
2 It’s not just about style but functionality. What are the technical and maintenance considerations of having a module vs a function, should it be used or included? why? those sorts of question could be highlit in the comments.
3 as to the maintenance aspect this would not be a single attempt but many. Perhaps in the future code evolution would allow for a single best practices example to emerge where code segments considered to be the best approaches by the community ( at the time) would be put into the master code example together with who wrote it and when. A form of code scoreboard.

Of this, I am skeptical. Even in FOSS ecosystems, people are time-constrained, so they invest effort into projects which are useful and/or fun. (In any case, don’t let this discourage you, of course you can start this project yourself and maybe people will contribute).

In what context would a module and a function be considered alternative solutions to a problem?

They are entirely different concepts.

My tip if you want to do this: just claim that Python/Matlab/Java are 100 times faster than Julia in solving the problem, and you should quickly get a few implementations out of Discourse :slight_smile:

6 Likes

Skeptical is good and I will give my suggestion more thought and see if I want to put my code where my thoughts are. I was using wordsearch to make the concept approachable to many ( most people have an idea what is involved) BUT mostly fun.

I don’t know what I was thinking about when I compared a module to a function. Sorry about that, I have no excuse.

1 Like

It could be fun. Sort of like Al Zimmerman’s Programming Contests

Maybe a new one every six months or so. If the problem was an easy one (say, the 8 queens), maybe 3 months.

1 Like

excellent idea, well done. Never heard if Mr Zimmerman, great piece of intel thanks @blackeneth