On 07.01.2016 10:02, Bastiaan Veelo wrote:
About the "Your code here" box: I accidentally had your page and
dlang.org side-by-side with the same "Round floating point numbers"
example, only yours had the inline comments stripped.

Yeah, I also stripped some of its functionality (processing args instead of stdin), and I dropped the RPN calculator example entirely, because I couldn't get it down to acceptable size.

I think the
comments add a lot of value, and would advise to leave them in. I know
this design looks bad when that box gets too high, and I think we would
need a solution that allows examples with more lines without the length
of the example affecting the layout of the page. Here are a few ideas
(without knowing whether they would be doable or not):

   1. Box with fixed height and a slider to scroll the contents.
   2. Manually resizable box, much like the edit field in the online
forums, with a slider when necessary.
   3. Box clipped to a fixed height (possibly with fade-out effect at
the bottom). It could be expanding dynamically on mouse-over. The
buttons would probably be best to have at the top.
   4. The drop-downs in the "Why D?" section work very well. Similarly,
the box could be clipped as in 3 and expand on click. Encourage clicking
on it by having a big "Play" button on it as you see on video's -- or
something similar.

Thanks, the idea of making the example expandable somehow didn't occur to me.

However, my stance at the moment is that the intro examples should just be really short. The message is that you can do something useful or cool in just a couple lines of code. That means outright rejection of anything longer than, say, 20 lines, or maybe even just 15.

Reply via email to