Snippet Testing

Please tell me someone checks/runs them...

Page 1 of 1

7 Replies - 677 Views - Last Post: 24 March 2009 - 10:57 AM

#1 KYA  Icon User is offline

  • Wubba lubba dub dub!
  • member icon

Reputation: 3202
  • View blog
  • Posts: 19,232
  • Joined: 14-September 07

Snippet Testing

Posted 22 March 2009 - 12:21 PM

I imagine people test them before approving them right?

How in the devil did any of you get that to compile? C++ does not allow for non constant or dynamically allocated arrays to be declared in that manner. When that array is declared, it has no idea what 'n' is.
Is This A Good Question/Topic? 0
  • +

Replies To: Snippet Testing

#2 Martyr2  Icon User is online

  • Programming Theoretician
  • member icon

Reputation: 5186
  • View blog
  • Posts: 13,916
  • Joined: 18-April 07

Re: Snippet Testing

Posted 22 March 2009 - 12:45 PM

You are right but you can't expect the staff to test all the snippets they get. While this one is obvious, I am sure there are others that are flawed and would take a bit of time to test properly to find it. Time I am sure the staff doesn't have.

I am sure people are encouraged to let the staff know when they run across an obviously flawed snippet so that it can get a closer review.
Was This Post Helpful? 0
  • +
  • -

#3 OliveOyl3471  Icon User is offline

  • Everybody's crazy but me!
  • member icon

Reputation: 135
  • View blog
  • Posts: 6,581
  • Joined: 11-July 07

Re: Snippet Testing

Posted 22 March 2009 - 11:44 PM

View PostKYA, on 22 Mar, 2009 - 02:21 PM, said:

C++ does not allow for non constant or dynamically allocated arrays to be declared in that manner. When that array is declared, it has no idea what 'n' is.


Yeah, you'd think, wouldn't you? However, it did compile and run like it's supposed to, when I tried it in Dev-C++.
Weird, huh?
Was This Post Helpful? 0
  • +
  • -

#4 no2pencil  Icon User is offline

  • Professor Snuggly Pants
  • member icon

Reputation: 6627
  • View blog
  • Posts: 30,868
  • Joined: 10-May 07

Re: Snippet Testing

Posted 22 March 2009 - 11:51 PM

Quote

Cygwin:/home/code/c >$vi search.cpp
Cygwin:/home/code/c >$make search
g+ search.cpp - o search
Cygwin:/home/code/c >$./search.exe
how many numbers: num 0: 4
num 1: 9
num 2: 1
num 3: 2
num 4: 3
num 5: 9
num 6: 5
num 7: 2
num 8: 3
what number do you want to look for: 1
2 is equal to 1Cygwin:/home/code/c >$


Any questions?
Was This Post Helpful? 0
  • +
  • -

#5 no2pencil  Icon User is offline

  • Professor Snuggly Pants
  • member icon

Reputation: 6627
  • View blog
  • Posts: 30,868
  • Joined: 10-May 07

Re: Snippet Testing

Posted 22 March 2009 - 11:57 PM

Though it's sloppy it seemed fine.

I've corrected it, both declaring the integer with a value, & prompting for it's input prior to usage.
Was This Post Helpful? 0
  • +
  • -

#6 Raynes  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 614
  • View blog
  • Posts: 2,815
  • Joined: 05-January 09

Re: Snippet Testing

Posted 23 March 2009 - 12:10 AM

Do they test them though? Just wondering because if so, the instructions I provided on my Clojure snippet might not be sufficient for someone who doesn't have /use/ Clojure. I should of just said to install Enclojure for Netbeans and load the file in the REPL. :|

This post has been edited by Raynes: 23 March 2009 - 12:11 AM

Was This Post Helpful? 0
  • +
  • -

#7 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6246
  • View blog
  • Posts: 24,014
  • Joined: 23-August 08

Re: Snippet Testing

Posted 23 March 2009 - 04:15 AM

Just wanted to say that yes, we do test the snippets.
Was This Post Helpful? 0
  • +
  • -

#8 skyhawk133  Icon User is offline

  • Head DIC Head
  • member icon

Reputation: 1953
  • View blog
  • Posts: 20,377
  • Joined: 17-March 01

Re: Snippet Testing

Posted 24 March 2009 - 10:57 AM

We've been getting over 150 new snippets/week and still managing to get most approved within 72 hours or so. Some of the more obscure languages will sit longer until someone has the time to review/research it, but for the most part we're cranking through them pretty quickly.

150 snippets is a ton for our small team to review, test, check for copyright infringement, and reply to/edit if need be. You're always welcome to report snippets and it generates a discussion for us in our back room.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1