# MATLAB Spoken Here

## Tapping the Community to Get Real Work Done

A few weeks ago I was approached by a reader, Mark, asking for algorithm advice. He had a simple, well-bounded, easily-verifiable problem: sort an array based on a certain combination of the values’ digits. This question was both interesting and easy enough for me, which made me think that this would be an excellent problem for Cody.

Using Cody to solve a problem like this has numerous advantages. First off, you’ll get an answer quicker and more complete than you would by asking me to help you out. Second, it will only cost your time. Third, it helps out the Cody community by keeping the pipeline full of interesting challenges.

Creating a new problem is simple and fun:

1. From Cody, press the big blue “Create a Problem” button.
2. Fill out the problem title and description. If you can formulate the problem clearly in a few sentences, it’s a big indicator you’ll get your problem solved.
3. Finally, you need to create a test suite to make sure the problem gets solved. The more robust the test suite, the better the solutions will be. Be sure to cover cases like empty value, repeat values, out of bounds values, etc.
4. You can create an optional reference solution. Reference solutions are good if you’re providing a brain teaser that you’ve already solved. But if this is a problem you don’t know yet how to solve, feel free to leave it out.
5. Publish it.
6. Profit!

Try out the problem I created for Mark and try to beat my answer!

Just remember that Cody rates problems based on an approximation of code size, which may not be the best code for maintainable, reusable project.

### 3 Responses to “Tapping the Community to Get Real Work Done”

1. Craig Doolittle replied on :

So, all the solutions are locked. In order to view any of the solutions, one would need to provide a solution of the same size or smaller. If you didn’t know how to work the problem in the first place, how are you going to beat everyone else and provide the most optimum (smallest) code in order to view all the other solutions?

2. Sean de Wolski replied on :

@Craig, Provide a solution to another problem or two and it will unlock all of the solutions for that one.

3. Joseph replied on :

A novice to mathworks having difficulties importing monthly data with dates. what I need is a consultant, outside or inside mathworks to complete the project for me for a fair fee. I have my data already. Need help with importation.
Need mathworks expert for a fee. I believe it will be a piece of cake for someone who knows mathworks
Thanks
Joseph

 Name (required) E-mail (required, will not be published) Website (optional) Spam protection (required): What is 4 + 9 ?

Wrap code fragments inside <pre> tags, like this:

<pre class="code">
a = magic(3);
sum(a)
</pre>


If you have a "<" character in your code, either follow it with a space or replace it with "&lt;" (including the semicolon).

News from the intersection of MATLAB, Community, and the web.

These postings are the author's and don't necessarily represent the opinions of MathWorks.