3

Hey everyone,

We haven't done a good contest here on DaniWeb for quite some time, so I'd like to start one up again :)

Throughout the months of June and July, I'd like to encourage members to submit fully working code snippets to our library.

Throughout the month of August, we're going to vote on the best snippets fitting the criteria of most creative functionality, most elegant code and most efficient algorithm. The three winners will each receive Amazon gift certificates up to $250.

More details to follow shortly :)

Happy coding!

Edited by happygeek: unstuck

35
Contributors
90
Replies
101
Views
5 Years
Discussion Span
Last Post by L7Sqr
Featured Replies
  • 3

    Darn it, that's me out then :) Read More

  • 1
    Dani 1,638   5 Years Ago

    Top level forums don't display stickyness, as a general rule. Plus, Davey, double posting is a rule for a reason. It can seriously hurt our SEO. Plus, I don't want to have to keep up with multiple threads when people are asking questions about the contest. Just sayin' ;) ;) Read More

  • The way I see it, every programmer has a bag of tricks that they use. To me, the point of the contest is to show off one such trick that you think is clever and/or useful. It can be a nice language-technical trick (e.g., doing something that people don't suspect … Read More

  • 3
    Ezzaral 2,714   5 Years Ago

    If you've written that program 500 times, you're doing it wrong. Read More

  • 4

    Well, the votes are in, and we are happy to be able to announce that the winners are as follows: The prize for the code snippet which demonstrated the most creative functionality goes to Tony Veijalainen, better known as that popular moderator pyTony for his Python snippet: '[Class based polynomials … Read More

0

Everybody can take part? And what is the topic? And which language should it be done in (Java, C++, C etc) ?

0

No restrictions ... the only requirement is that the code be fully working and bug-free.

At the beginning of August, members will have the opportunity to vote on all code snippets submitted throughout the months of June and July.

Edited by Dani

0

The official annoucnement, including the rules and the submission deadlines:

Enter the first DaniWeb Code Snippet Contest

...
Can you code? Of course you can, this is DaniWeb after all. The question is how good can you code? Are you the best coder in the DaniWeb community? Now is your chance to find out by entering the first DaniWeb Code Snippet Contest!

It's really easy to take part, all we ask is that all code is fully-working and bug-free: code which does not work, or which is buggy, will be disqualified. All entries must be properly submitted as a code snippet using the article editor, code posted as a normal discussion thread will be disqualified.

The competition is open to anyone who is a registered member of DaniWeb, that includes newbies and old hands, regular forum contributors and lurkers, even moderators and admins. Anyone who can code is encouraged to show us what you are capable of. What's more, there are some great prizes to be won, including:

$250 amazon.com gift card for the most efficiently written code

$150 amazon.com gift card for the most creative functionality

$100 amazon.com gift card for the most elegant code

In addition, the winners and runners-up in all categories will be awarded some much deserved positive rep points!

The contest starts now, so get coding! You can submit code snippets in any language as long as they are fully working and bug free. Submissions will be accepted until midnight (EST) on Tuesday July 31st, 2012.

To submit a code snippet, simply head to the appropriate programming forum for the language your snippet is coded in. Click on the big yellow 'Contribute New Article to this Forum' button, and when the article editor appears select 'Code Snippet' from the 'Type of Article' drop down menu.

Member voting will commence on Wednesday August 1st, and end at midnight (EST) on Wednesday August 15th with the winners being announced the following day.

Good luck people, and remember this competition is open to everyone. The winners will be determined by the votes of the community itself; the wisdom of DaniWeb crowds will prevail rather than the opinions of one or two members alone. This is a great chance to show everyone what you have got, forget the prize money this is all about kudos: will you be crowned the best coder on DaniWeb?

Edited by happygeek: removed link to this thread, as now redundant

0

Any restrictions on length since it's being called a snippet? One function, one class, one assembly, anything like that?

0

No ... but most efficiently written code cannot simply be hello world to garnish enough votes to win :)

0

Careful! The relevant threads in the Software Development and Web Development forum categories are not sticky!

Or at least that's what I see...

not_sticky

Edited by m4ster_r0shi

1

Top level forums don't display stickyness, as a general rule.

Plus, Davey, double posting is a rule for a reason. It can seriously hurt our SEO. Plus, I don't want to have to keep up with multiple threads when people are asking questions about the contest. Just sayin' ;) ;)

Edited by Dani

0

Soz Dani, didn't realise that the top level forums don't get sticky. The questions across threads point was dealt with by

If you have any questions, please ask them in the Geeks' Lounge Code Snippet Contest thread here.

I posted them in the developer forums (now deleted) as that is where most people who are most likely to want to enter are going to see the announcement, surely? I'm not sure how many will see this thread here in the lounge.

Maybe the mods who deal with specific coding forums could post something, in their own words so as to avoid the SEO penalty, in those specific langage forums which inform members that a coding competition is underway and point them in the direction of this thread?

There will be an announcement in the DaniWeb Digest newsletter as well, of course, and I'm about to post something on my Facebook page.

Edited by happygeek: editing

0

Maybe the mods who deal with specific coding forums could post something, in their own words so as to avoid the SEO penalty, in those specific langage forums which inform members that a coding competition is underway and point them in the direction of this thread?

How about a link back to this thread, as to avoid having to keep up with multiple threads about the same thing?

Edited by Dani

0

...and point them in the direction of this thread

How about a link back to this thread, as to avoid having to keep up with multiple threads about the same thing?

Same thing, surely? :)

0

Hmmnnn . . .

No restrictions as to whether the code is old or new?

Looks like an opportunity to dig up some old code and share it. It is well-tested and I know it works, but it is pretty specialized, so might not have broad appeal. (Can you guess what kinds of programs I write? See my sig for a hint.)

Are those gift certificates valid on amazon.ca? (Are you willing to barter? I'd go for an AdWords credit or something similar: Facebook PPC credits, etc.)

Edited by DavidB

0

No restrictions as to whether the code is old or new?

As long as it's new to DaniWeb. :)

Looks like an opportunity to dig up some old code and share it. It is well-tested and I know it works, but it is pretty specialized, so might not have broad appeal.

As long as you have the authority to contribute it, and it can't be found elsewhere on the web (violating one of our site rules) ... Hey, it might win for most creative functionality!

Are those gift certificates valid on amazon.ca? (Are you willing to barter? I'd go for an AdWords credit or something similar: Facebook PPC credits, etc.)

As long as there is a gift certificate program available :)

0

Do not take me wrong, but I'm sort of dubious about voting for best snippet from less visited forum sections. For example I can do some snipped for Android, but how can I rich wide daniweb audience if only handfull people check Mobile Development section, and even less of them may be skilled with Android to understand what my code snippet is about.

0

I can see your point to the extent of that code snippets submitted to the more popular languages here will probably have an easier time getting votes. I think that's just the nature of the game, though.

0

Or should we implement something with Python, C, C#, VB and Java, but then the snippets would get separate votes, not total of all versions.... Of course I would need still to learn C# (and improve Java/C/VB)...

Edited by pyTony

0

To help with the problem of getting votes on less visited forums, I would suggest that, at least, all snippets should have a link posted on this thread, and ask that moderators try to take the time to check out each submission, even if it is in a foreign programming language (as in, not the mod's preferred language). I don't know about you, but I can appreciate a nice piece of code regardless of the programming language (as long as I understand it, which I do for most languages). But beyond that, as Dani said, it's part of the game, if you choose a narrow language to code a piece of code with a narrow application area, then you can't expect as much of a wide-spread appreciation of it.

Also, I'm starting to think of ideas and I'd like to get a feel for the expected extent of the snippet. So here are two ideas I have, tell me if they are too much or too little.
(1) A logging system for exceptions in C++, with some predefined logging and handling behaviors. With configurable sinks, strong safety guarantees, and so on.
(2) An adjacency-list graph overlaid on a breadth-first tree layout to allow for efficient, cache-aware (or cache-oblivious) binary-search tree implementations over nodes of a general graph (adj-list).

The first is pretty simple (~200 lines or so). The second is pretty hefty (~1000 lines or so) with loads of advanced C++ techniques. So, are code snippets expected to be closer to the former or the latter? Or am I completely crazy?

0

So, are code snippets expected to be closer to the former or the latter? Or am I completely crazy?

I don't think we're "expecting" one way or another, as long as the code snippet is, indeed, a self-contained snippet.

My mind is churning with regards to potential other awards we can give for snippets such as most useful ;)

0

I do not know, but maybe there should be encouraged to be considerable discussion in Code Snippets posted this summer commenting the strong points and interesting features of snippets as well as any blemishes. This could be used as less knowledgable members to gain insight of language they do not use and give them possibility to evaluate second hand through other's comments the snippets outside of their comfort zone.

I think in Python terms the upper limit of Code Snippet to be around 200-300 LOC. Main thing for me is that other members can crasp the whole code in their mind. Writing with more verbose/lower level languages could mean narrowing the scope of snippet. One possibility would be modular design with simple short basic implementation for some parts. Then you could present gradually improvements to those implementations. That would also make very interesting and relevant reading. Or you could have program with only basic functionality implemented and clear road for impovents. Even you could leave some obvious point unimplemented and point it out to encourage the readers to expand on your post. This my snippet could be example of this kind of left in middle, "open ended", (even at start) post: http://www.daniweb.com/software-development/python/code/403873/text-based-english-solitaire-from-wikipedia

This said I have posted many very short 'trick' or example of technique style of posts as code snippets, including one liners http://www.daniweb.com/software-development/python/code/382803/one-line-vigener-single-decryptencrypt-function-with-generator

I do not know how about people feel about these snippets, however. Have to get inspiration to post something, so I can find out through this competition. I have though shared so many ideas as I have posted until moment of writing this post 94 snippets, so I have not anything up in my sleeve waiting. At least when somebody starts to post some snippet and I get to think "I can do this much better in Python", I should have some inspiration.

Edited by pyTony

0

To help with the problem of getting votes on less visited forums, I would suggest that, at least, all snippets should have a link posted on this thread, and ask that moderators try to take the time to check out each submission, even if it is in a foreign programming language (as in, not the mod's preferred language).

I agree with this. I was worried about that problem too. I'm in the process of writing something that will help me automate as much of my work as possible and I'm considering submitting a (self-contained) part of it to the competition. I'm using haskell for this, as functional languages are better suited for writing programs like the one I write (I heavily (ab)use pattern matching). I found a way, though, to write the part I want to submit in c++ (yes, there is native support for (even nested) pattern mathing in c++ (those of you who understand what I mean, please don't tell the others what I'm talking about)), and that's what I'll be submitting. But even if this solves the problem for me, others might not have such an option, so, once again, I agree with mike's suggestion.

I have a couple of questions too:

-> Are we allowed to use freely available 3rd party libraries?
-> Are we allowed to submit more than one code snippets?

0

My policies of these things considered 'cheating' during studying:

  1. I consider using all possible libraries a plus when considering the efficiency of the snippet.
  2. Are you allowed more than one post to Daniweb? (hint: check my post count) ;) The purpose is not to stop me reaching 100 posted code snippets, I hope.
0

Another point is the disqualification points, few possible cases, would these be disqualified?

  1. poster posts code as discussion thread asking feed back, does some suggestions and own improvements and posts it result as code snippet.
  2. Poster posts a code snippet and posts a bug fix after one hour as reply
  3. Same as 2 but he is moderator and he edits the original post
  4. After post as colde snippet somebody notices missing newline in output in some corner cases.
0

poster posts code as discussion thread asking feed back, does some suggestions and own improvements and posts it result as code snippet.

No, it wouldn't be disqualified if they received help from the community on their code and, ultimately, decided to submit the final piece as a code snippet.

Poster posts a code snippet and posts a bug fix after one hour as reply

No, this wouldn't be disqualified. If anything, it's encouraged that members want to continually improve code they contribute to our code snippet library even after posting it. It can only help future DaniWeb members looking for the code!

After post as colde snippet somebody notices missing newline in output in some corner cases.

It would be up to the discretion of members whether they want to vote on a code snippet that has small bugs for corner cases and edge cases.

0

Members can submit as many code snippets as they like. Only code that was contributed during the months of June and July, and unique to DaniWeb, would qualify.

0

Hi,

I'm confused what you mean. I'd like to think that people want to ensure that any code submitted to our code snippet library is pretty much bug-free regardless of whether there is a contest or not, and that if a bug is discovered, it will be fixed regardless of whether it's June or August or October.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.