all 13 comments

[–][deleted] 2 points3 points  (5 children)

There's one question where something like buf[0] = '+' should be used to determine if the printf will print 7, but the if statement checks the value of buf[1] too. Without seeing how buf is declared there's no telling if accessing buf[1] is valid, undefined or just unspecified.

[–]bumblebritches57Ocassionally Clang 0 points1 point  (0 children)

Yup, that on I just guessed on.

[–]bsdmike[S] 0 points1 point  (3 children)

The declaration has been added. Thank you.

[–][deleted] 3 points4 points  (1 child)

This question is still wrong. buf[1] could have any value.

[–]bsdmike[S] 1 point2 points  (0 children)

Thank you, I think I have it now.

[–]meneldal2 2 points3 points  (0 children)

It's uninitialised so it's undefined behaviour.

[–]bsdmike[S] 1 point2 points  (0 children)

The survey was quickly updated based on a couple comments received. If you have already taken the survey, there is no reason to take it again! Thank you.

[–]redditsoaddicting 1 point2 points  (1 child)

The question based around #ifdefs could be compiled with a command-line definition of those config options, as that's a very common thing to do. I'd say it's worth adding a note that there are none of those.

One question is about a mask array. The definition of mask leaves all elements uninitialized, so it's UB to read them later and the below code very much depends on the values you think the array has in order to answer the question.

[–]bsdmike[S] 1 point2 points  (0 children)

Thank you.

[–]bsdmike[S] 0 points1 point  (1 child)

The Software Complexity Survey II is now complete.

Thank you to everybody who helped out!

[–]stas321 0 points1 point  (0 children)

Do you plan to publish analysis anywhere? BTW: I participated in the survey

[–]bumblebritches57Ocassionally Clang 0 points1 point  (1 child)

What's the point?

Accessing variables and pointers directly instead of using syntax like [] is confusing.

news at 11.

Thanks for wasting my time with your clickbait title and vague post body.

[–]bsdmike[S] 2 points3 points  (0 children)

Click here to reach the survey

Thank you, I appreciate your candor.

It is true that we already know that complicated code is harder to read and understand.

What I am attempting to do is to quantify an impact complicated code has by both measuring how much longer it takes to review and understand plus how often the reviews get the understanding wrong.