Annotated code: Circles bouncing off lines
31–40 of 70 posts
Re: Annotated code: Circles bouncing off lines
#32I think this is awesome but I think it's a little too spaced out. I like the side-by-side display (gives the code an approachable narrative) but I wish I had to scroll up and down (to remind myself of what's going on) less.
On mobile it combines the sides together in a way that I find an appealing option. Screenshot: http://imgur.com/xRvDubc Anybody know if there's an easy way to get something like the mobile view on desktop (without spoofing user agents, etc)?
doco.css:202
> /* ---------------------- Low resolutions (> 320px) --------------------- */
> @media only screen and (min-width: 320px) {
Re: Annotated code: Circles bouncing off lines
#33I hate this left/right code documentation fad with passion. Making my eyes jump horizontally across the page every few lines is about the worst you can possibly do for readability. Just keep the damn comments inline and use colors/font-faces/fold markers to make it readable.
Do you also prefer footnotes and sidebars inline when reading articles? These are standard typographical practices. I do set my comment color to super light so comments don't distract me too much when reading code, but I wish there was a better way.
It helps if the inline commentary is differently colored or in a separate box.
I also use light colors for comments when reading source code, but I personally prefer this over having them as footnotes or sidenotes.
Re: Annotated code: Circles bouncing off lines
#34Earlier quoted context omitted.
Inline comments are a part of the code's core layout, so you get into trouble when you make them disappear (as is the trouble with most folding systems). It is like parenthetical statements in prose: you can't really make them disappear, they are right their in your face. It is considered bad style if they aren't extremely brief, otherwise you should use a foot or side note.
Why are people trying to make comments disappear? They are there for a reason. I agree with what moe is saying, though not moe's tone.
Re: Annotated code: Circles bouncing off lines
#35That's pretty educational. OT: I'm not a game developer. What are the other patterns - besides the global state and mutation functions - that one can use for a game loop?
Re: Annotated code: Circles bouncing off lines
#36Earlier quoted context omitted.
Why are people trying to make comments disappear? They are there for a reason. I agree with what moe is saying, though not moe's tone.
Comments get in the way of the flow in reading code; they are often of little value that easily goes negative when they distract.
Re: Annotated code: Circles bouncing off lines
#37Re: Annotated code: Circles bouncing off lines
#38Re: Annotated code: Circles bouncing off lines
#39Re: Annotated code: Circles bouncing off lines
#40Just have to say, it gets more amusing with more balls and lines: https://zifnab.net/circles-bouncing-off-lines/