ziglings
ziglings copied to clipboard
Cull/truncate long exercises
Everyone agrees: the shorter exercises are better and the longer ones are worse. In particular, Quiz 7 (058_quiz7.zig
) is too darn big! It really doesn't belong in Ziglings (though it was a good exercise for me to write).
Anything over 100 lines is suspect. In fact, maybe I should make a hard 100 line limit?
dave@callisto~/ziglings$ wc -l exercises/* | sort -n
16 exercises/010_if2.zig
21 exercises/001_hello.zig
22 exercises/026_hello2.zig
...
102 047_methods.zig
105 076_sentinels.zig
108 068_comptime3.zig
125 082_anonymous_structs3.zig
127 065_builtins2.zig
140 063_labels.zig
145 070_comptime5.zig
184 051_values.zig
216 075_quiz8.zig
471 058_quiz7.zig
Rework them for concision! Thanks again to @alexgenaud for the gentle nudge. :-)
No, not a hard 100 line limit. After that you still have to shorten helpful comments. ;-) Rather a number n of tasks/errors, which is not exceeded related to the number of functions contained in the code. For example in the ratio 1:1. If there are e.g. 2 errors, there are max. 2 functions. But 2 errors in one of two functions goes then also. And then the limit e.g. at 8 functions. Would be max. 8 errors. Now these are only example values, for this you have to check the lessons for such a ratio.
I'll go ahead and close this for now. Just keeping up with the changes to the language is plenty of work. :-)