7
\$\begingroup\$

I have posted a question: C++/CLI wrapper around a C library

In the C library (and subsequently in the C++/CLI wrapper), I have removed a bunch of structs and methods that are very redundant with the ones posted. Examples:

Examples of posted code:

typedef struct {
    int left;
    int top;
    int right;
    int bottom;
} frame_t;

int resize_to_fill(image_t *image, int width, int height);
int pack(image_t *images, int nb_images, parameters_t params);

Example of not posted code:

typedef struct {
    int timestamp;
    int group;
} photo_timestamp_t;

int resize_to_fit(image_t *image, int width, int height);
int clusterize(photo_timestamp_t *images, int nb_images);

Obviously the wrapper code around these structs and methods are very similar, so I did not think it interesting to post these parts.

I am wrong in my assumption ? Should I post all my code, just in case ?

| |
\$\endgroup\$
9
\$\begingroup\$

Yes, it's always better post everything. That way the reviewers have the full picture, and can make suggestions they wouldn't make otherwise.

As long as the question fits the 30k character limit, I hardly see a reason to strip anything from code to be reviewed. Remember this isn't Stack Overflow, we're not expecting anything purposely shortened for the sake of posting.

The more context, the better.

| |
\$\endgroup\$
  • 6
    \$\begingroup\$ Be aware that more code also means more time reqired to review. sometimes it's preferrable to give much of the overarching context in plain english \$\endgroup\$ – Vogel612 Apr 1 '15 at 20:46
  • 2
    \$\begingroup\$ @Vogel612 indeed - or to break a post down into "modules" or "themes" and post it as separate questions. \$\endgroup\$ – Mathieu Guindon Apr 1 '15 at 21:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .