Jump to content

Ideas for Implementing a better codding challenge.


Recommended Posts

how to make the challenge better...

Ideas for future coding challenges

Address a deficiency/usability problem in the tool :o (did I say that?!)

Address a highly rated Wish List request

(are these the same thing?)

Let the people speak? A thread with suggestions that could be culled into a poll (ala Dilbert Weasel Nomination process or Google GMail features)

Ways to Improve Submission Participation

Keep the scope of the problem small enough to allow someone to work on it "during lunch"

Create some sort of teams and a private place for them to collaborate.

Ways to Improve Voting participation

See Ideas above. If the solution to be voted on affects me in some way, I might be more inclined to look at it (and learn from it)

Ways to make the challenge more fun

See all above
:P
Example:
If
I was a UI expert and you were a pattern expert, we could combine our talents,
"during lunch" and
to
.

Link to comment
Keep the scope of the problem small enough to allow someone to work on it "during lunch"
I agree.

I worked on this last challenge over a long period of time, with each session being anywhere between a few minutes to around an hour and I had a lot of periods when I couldn't get around to it. As a result, remembering everything I wanted to do wasn't always particularly easy.

A smaller scope, like not building an application to demo the API, would have made it easier (although less interesting).

I also like the idea about seeing how small you can make a certain bit of code.

Link to comment

Idea for future challenge:

I'd like to see something involving the picture control, which I think is under utilized. Perhaps some subVI - algorithm that recognizes when you have "selected" various shaped objects or drawing artifacts in the picture.

Or a really efficient way to create a highlight on the picture around an arbitrary object, either a glow or walking ants.

Another topic I'd like to see is a challenge that uses one of the GOOP implementations in a specific way. Not a whole application, just the best object class and concise method set to implement an item. (maybe a picture control drawing object?).

Link to comment

Idea for a new challenge:

Program solves a jigsaw puzzle. Input is a zip file containing bmp files of each piece in random orientation (or other suitable file format) Output is a image of the solved puzzle, and a table of x,y and rotation location for each of the pieces. Sample puzzles to solve provided, but of course the program has to solve a similar puzzle that the programmer doesn't get to see in advance. Make it tough enough that just matching edge profiles won't work efficiently, the winner will likely have to do some kind of texture, color or pattern matching to sort out the pieces.

Best Regards, Louis

Link to comment

I participated in NI's first coding challenge (BitTwiddling) as an internal at Philips Research. It was fun, I learned a lot and we won it :yes::D

I still find it the nicest coding challenge so far because it was so simple. You could think about it and get new ideas and you just couldn't stop working on it... Our team really liked it, I guess the boss liked it less :shifty:

Small, simple... yet quite a challenge to do it in the fastest way.

Or, a coding challenge with as target the least LV nodes (or code bytes) instead of the quickest one ?

Joris

Link to comment

You might also consider a different prize for the winner. I'm sure that a NI-6008 works for some people. But I'd hazard a guess that a $150 Amazon gift card would go over with more people...

BTW, I didn't participate in this coding challenge, mostly because of time constraints. So a quick coding challenge would be nice. But a quick coding challenge could also mean that the prize was less costly. I too would like to see a challenge with the picture control. In fact, when I read the previous post from Mike Ashe, I thought of this post, which was done to prove that with enough time and effort or experience (in this case), any UI can be done in the picture control.

Link to comment
You can already give the community many gifts here. Show us what you've got.

As far as coding challenges, I'm up for the more challenging ones that push the envelope and the limits of LabVIEW. Bit twidling and the like is pretty boring, if you ask me. You should also throw in a little VI scripting while you're at it. For example, why not have a challenge that asks you to come up with a text representation of a VI? Then you create a tool to read-in that file and generate the VI for you. Now that's a challenge! This is LAVA after all... :shifty:

Link to comment
For example, why not have a challenge that asks you to come up with a text representation of a VI? Then you create a tool to read-in that file and generate the VI for you. Now that's a challenge! This is LAVA after all... :shifty:

This is along the lines of what I was thinking about. Of course, do we want to turn LV into a text-based language? :D And Michael's idea would have to somehow get around these issues (yes, blatant plug for posts of mine that no one's responded to yet ;) ). I was also thinking something that ventured into somehow decoding the VI file format would be cool (Word and Excel support in OpenOffice.org got me thinking), but I really have no idea whether this is at all possible/practical.

Jaegen

Link to comment
This is along the lines of what I was thinking about. Of course, do we want to turn LV into a text-based language? :D <snip>

No, but there are several reasons for wanting to have this ability. A current one that I am running into is declassification and reuse of LabVIEW code that was developed on a DoD classified computer system. Now for text based languages you can print out the code or look at it with a text editor and verify that there are no classified numbers or information, but currently with LabVIEW this is impossible. There are a few software tools that exist that can automate this process for text based code, but non (that I am aware of) that can do this for LabVIEW.

If we could convert VIs to XML, we could run the XML through one of these tools and then convert back to LabVIEw, or at least allow the code to be released.

Link to comment
No, but there are several reasons for wanting to have this ability. A current one that I am running into is declassification and reuse of LabVIEW code that was developed on a DoD classified computer system. Now for text based languages you can print out the code or look at it with a text editor and verify that there are no classified numbers or information, but currently with LabVIEW this is impossible. There are a few software tools that exist that can automate this process for text based code, but non (that I am aware of) that can do this for LabVIEW.

If we could convert VIs to XML, we could run the XML through one of these tools and then convert back to LabVIEw, or at least allow the code to be released.

IMO this is a typical example of something that requires a lot of work and a lot of time, still - all you could realistically hope to acheive (within the constraints of a challenge) is a tool that does this on a small subset of all the functions that exist. Besides, such a tool already exist (by the looks of it, at least some bits and pieces) in the "...vi.lib\_script\XML Scripting" folder in LV8.2

What would be more interresting, and also a lot easier and faster, is to write a compiler that makes VIs out of a textual language. Then you are free to make the language syntax and style anyway you like, without the restriction that it has to be a textual representation of the VI.

Nevertheless, i'm much more for challenges that most of us actually has time to do, since the usefulness of any code resulting from a challenge will be very limited at best. I think a good challenge is not one that pushes the limits, but rather one that sparks off creative solutions.

Link to comment

Just for shits and giggles, what would it take (money fame whatever) for a LAVA member to create code that converts a VI to a text representation and back? Call it a compiler, call it what you want.

Sure, it isn't something for the faint of heart, sure, it can't be done over lunch. Sure, it's not your typical challenge.

Let's call it the LAVA Super Grand Challenge.

Link to comment
... create code that converts a VI to a text representation and back? Call it a compiler, call it what you want.

Sure, it isn't something for the faint of heart, sure, it can't be done over lunch. Sure, it's not your typical challenge.

Let's call it the LAVA Super Grand Challenge.

Are you trying to bait "Aristos" into sharing code developed out of boredom? :D

Link to comment
Just for shits and giggles, what would it take (money fame whatever) for a LAVA member to create code that converts a VI to a text representation and back? Call it a compiler, call it what you want.

Sure, it isn't something for the faint of heart, sure, it can't be done over lunch. Sure, it's not your typical challenge.

Let's call it the LAVA Super Grand Challenge.

This is what scripting is really for. This is not only a challenge, it's important. The text-to-labview function is the important part. It needs to be written from an intermediate P language, so that various types of text can be converted to the P language and thence to LabVIEW. Now THAT would be useful.

Link to comment

I have played with most of the NI LV Challenges but the only one I submitted for was the Dictionary Challenge. The only reason I submitted that one was because I found myself "home alone" for a week-end.

Regardless of submitting, I have generally learned a lot form the part of the challenges I did develop, so....

How about a multi-part challenge?

An example would be the "Virtual Control" challenge. This is the answer to the age old question "How do I dynamically create LV Controls?".

We break it down into part with each part being a mini-challenge.

1) Create a utility that will allow us to drop arbitrary graphic objects on a picture control. Best performing?

2) Given #1 create a utility that tells us whech of the arbitrary objects from #1 the mouse is over.

3) Given #1 & #2 devlop an XControl that passes an event/queue element to a handler....

Just my 2 cents,

Ben

Link to comment
  • 2 weeks later...

Coding challenge idea:

What about simple game AI written in Labview? The game wouldn't need to be complicated, maybe something like Reversi, Connect 4, Checkers... The entries could be rated on not just the coding, but also on the UI and the quality of the game's decision-making. Depending on how they are written, it might also be possible to have two different entries play against each other, to find out which is the "smarter" implementation.

Link to comment
Just for shits and giggles, what would it take (money fame whatever) for a LAVA member to create code that converts a VI to a text representation and back? Call it a compiler, call it what you want.

Sure, it isn't something for the faint of heart, sure, it can't be done over lunch. Sure, it's not your typical challenge.

Let's call it the LAVA Super Grand Challenge.

I already have code that reads C struct statements (may be embedded) and creates an equivalent G cluster and that is not that involded. I develop that because I needed to read/write a binary configuration from/to a device. The binary data was formatted as the C struct used in the device. It was tedious and error prone to write G code to map the C flat (B? :D ) data back and forth to G, counting the length of each field, taking care of word alignment, etc.

The challenge would be doable for a small subset of C. However, I see such a task as a team project rather than a challenge. The person-hours of willing participants would be better used to work together and not in parallel against each other.

Link to comment
create code that converts a VI to a text representation and back?
Well, I'm not near a computer with LV at the moment, but I believe LV does have an "exposed" scripting Application class method for doing this (something along the lines of GenerateCCode).

I haven't actually tried it, but it's probably what the PDA module (and LV embedded?) uses and I don't know how good its C is. Also, it doesn't generate a VI back from the C code.

Link to comment

Addition - OK, I am near a computer with LV now and I can see that the method is a VI class method. It seems that the main obstacle in getting it to work is wiring in the TargetName which is a string. Anyway, it's not very interesting, as it's not coding and it's not G.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.